Submit | All submissions | Best solutions | Back to list |
SUMSQ - Sum of Squares |
We are interested in how many different sequences of N non negative integers there are that have the sum of their squares less than S. Note that the sequence (1, 2) is different from the sequence (2, 1).
Input
The input consists of only one line with two integers N (0 < N < 30) and S ( S < 100 ).
Output
A single integer representing the number of different sequences that have the sum of their squares less than S.
Example
Input: 1 4 Output: 2
Added by: | Nikola P Borisov |
Date: | 2008-12-04 |
Time limit: | 0.200s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO |
Resource: | Bulgarian Winter Competition 2003 |
hide comments
2016-07-30 02:16:58
Problem statement line 2: Note that squence (1,2) is different from... What is squence? Is it a square sequence? |
|
2009-03-07 15:19:09 Saeed Nejati
What's the Scoring rule for this problem?! |