Submit | All submissions | Best solutions | Back to list |
NITT2 - hai jolly jolly jolly |
Alp and Gaut are like always opposite to each other. Once Alp told that he can identify a number which is divisible by 252 (He knows because that is his girlfriends birthday - 25/2). Now to come up against Alp, Gaut said he can identify whether the number is divisible by 525 (poor Gaut don't have a girl friend though). The truth is they don't know to do it for big numbers. So you are here to help them with a method. Given a number you have to tell whether the number is divisible by 252 and 525.
Input
Number of testcases in first line, T (T <= 100).
Each line contains one number N, whose divisibility is to be tested (1 <= N <= 1050000).
Output
Each line containing two Yes/No. one for 252 and one for 525.
Example
Input: 4 252 525 16884 21347 Output: Yes No No Yes Yes No No No
Added by: | jack(chakradarraju) |
Date: | 2012-09-29 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
|
||||||
2015-01-20 03:19:52 Shivam Agarwal
Can anyone give me any tricky case I might be missing out... I am getting WA |
||||||
2015-01-20 03:19:52 Andy
weak test case! Last edit: 2012-10-15 09:11:46 |
||||||
2015-01-20 03:19:52 aristofanis
getting TLE with python. Any suggestions? |
||||||
2015-01-20 03:19:52 numerix
Actual TL is okay even for slower languages. |
||||||
2015-01-20 03:19:52 Aditya Pande
cant we have different time limits for different languages otherwise C has an upper hand |
||||||
2015-01-20 03:19:52 Mitch Schwartz
I don't see the interest in this problem when we already have PUCMM025. |
||||||
2015-01-20 03:19:52 :D
Really enough with absurd time limits. It's been discussed a thousand times over. Times under 1s definitively block many scripting languages. |
||||||
2015-01-20 03:19:52 Aditya Pande
the time limit is too high it can be done within 0.1 second with slight optimizations |