Submit | All submissions | Best solutions | Back to list |
MODULUS2 - BF_MODULUS |
See also http://www.spoj.com/problems/PROBLEM1/
Problem
Given an integer n print all the possibilities of a%n.
Input
The first line consists of an integer t, the number of test cases followed by t lines containing an integer n.
Output
For each test case print all the possibilities of a%n in descending order separated by a single space. After each test case print a new line character. If there are no possibilities print "NOT POSSIBLE".
Input specifications:
0<t<=100
0<=N<=100
Time limit: 1 second
Example
Sample Input
2
1
2
Sample Output
0
1 0
Added by: | cegprakash |
Date: | 2011-03-18 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | BF |
hide comments
|
||||||
2013-05-27 03:59:39 Jitesh
Please explain the input specification a li'l more clearly getting TLE again and again.. My solution works correctly on my PC.. |
||||||
2013-05-27 03:59:39 blashyrkh
0 points again for non-zero-length solution. Judge is buggy? @cegprakash: check my submission #5590243. sorry for trouble.. its fine now :) Last edit: 2011-09-01 19:55:44 |
||||||
2013-05-27 03:59:39 isak
I made the program in C++ and then I discovered that it do not acept C++. :( |
||||||
2013-05-27 03:59:39 binit
i am getting TLE.i have used \n at the end of each test case and code runs perfectly in my pc.can anyone help me please. edit: check your code for multiple test cases. Last edit: 2011-05-23 20:05:44 |
||||||
2013-05-27 03:59:39 [Rampage] Blue.Mary
If the judge is "ignoring extra whitespaces", it doesn't matter whether I use '\n' or space character to separate nonblank characters. And, my solution doesn't get "Wrong Answer", instead of "Time Limit Exceeded", which is impossible I think. edit: check your code for multiple testcases Last edit: 2011-05-23 20:10:57 |
||||||
2013-05-27 03:59:39 cegprakash
http://www.spoj.pl/problems/PROBLEM1/ this problem has the same test case |
||||||
2013-05-27 03:59:39 [Rampage] Blue.Mary
To problem setter: Is there any extra whitespace other than ('\n' at the end of each line) in the input file? My solution works fine at my own PC. |