Rational NumbersProblem code: SNCK04 |
All submissions for this problem are available.
A positive rational number is a real number which can be expressed as P/Q where P, Q are coprime positive intergers. The Chef is very hungry and can get food only if he solves the following question. "Given a number N, find the number of positive rational numbers less than 1 such that when expressed as P/Q, both P, Q are less than or equal to N". Please help the Chef in answering this question. The Chef promises to share the food with you.
Input
The first line contain a single integer T, the number of test cases. Following T (<= 1000) lines will contain a test case, a single number N (<= 1000000).
Output
For each test case print the output on a single line.
Example
Input: 3 1 2 3 Output: 0 1 3
| Date: | 2009-11-16 |
| Time limit: | 3s |
| Source limit: | 50000 |
| Languages: | C C99 strict C++ 4.0.0-8 C++ 4.3.2 PAS gpc PAS fpc JAVA NICE JAR C# C#2 NEM ST ASM D FORT ADA BASH PERL PYTH RUBY LUA ICON PIKE PHP SCM guile SCM qobi LISP sbcl LISP clisp SCALA HASK ERL CAML CLPS PRLG WSPC BF ICK JS |
Comments

Fetching successful submissions

why i cannot submit?
why i cannot submit?
are we allowed to use
are we allowed to use threading to speed up our programs
How to submit ?
How to submit ?
i am getting error restricted
i am getting error restricted content while submitting..help|????
You should log in from your
You should log in from your team accounts in order to submit a problem.
You are not allowed to use
You are not allowed to use threads.
"restricted content" ?? how
"restricted content" ?? how to submit ??
hey i forgot my team
hey i forgot my team name...what to do??
We are logged in our team
We are logged in our team account.. But still "restricted content" coming..
why i cannot submit the
why i cannot submit the solutions...?
We are logged in our team
We are logged in our team account.. But still "restricted content" coming..
You need to log in from your
You need to log in from your team accounts in order to submit a solution.
How to login 4m team's
How to login 4m team's account
it is not accepting team name and password
Team name Bytecoders
@Sumit You have to log in
@Sumit
You have to log in from your team name and password. The only reason it may not accept is if you are entering one of them incorrectly.
i have been trying for around
i have been trying for around 1 hr and not able to login.
My team name is coder can admin help me out?
can you mail me my password? please help me out?
hey. are the input numbers
hey. are the input numbers sorted????
@KGP-rockers Each test case
@KGP-rockers
Each test case contains only a single number N. The test cases may not be in sorted order.
We are logged in from our
We are logged in from our team account which is 'cv' but still we are no able to submit. A message "Restricted Content" is coming each time we click Submit.
hey. are the input numbers
hey. are the input numbers sorted????
@ chandra villa You have not
@ chandra villa
You have not registered for Snackdown. Your team is registered for the test contest. You need to register separately for this.
@aniruddha any chance for us
@aniruddha any chance for us competing now??
we were not aware that we had to register separately for today's event
plzzzzzz
@ chandra villa You cannot
@ chandra villa
You cannot participate in today's contest. There are going to be other team contest in the future, you can participate then.
"restricted content" ??
"restricted content" ?? unable to submit.
How to submit ??
"restricted content" ??
"restricted content" ?? unable to submit.
How to submit ??
Busted again
Busted again muddafuckas!
What the fuck man! Im tellin you, lemme handle this shit, the world will be much happier.
Fuckin assholes got the braniest motherfuckers up their mama's pussy butr still cant lick their own assholes.
how to submit the sol..
how to submit the sol..
Fuck the mothers of those
Fuck the mothers of those chefs who found out such an unorganised layout for such a contest which seems to be great but is rather fucking.
@chayya you have to log in
@chayya you have to log in from your team id
what is the lower bound for
what is the lower bound for N?
i am also not able to submit
i am also not able to submit the content "RESTRICTRD CONTENT" aDMINS PLEASE HELP...i am logged in from my team account
@ Nalin You were supposed to
@ Nalin
You were supposed to register separately for snackdown. You probably registered for the test contest.
@Aniruddha my code is as
@Aniruddha my code is as clean as it gets but its in Java which makes it slower.... cnt u allow for a slightly longer running time if we code in Java ?
@Aniruddha.. i forgot my team
@Aniruddha.. i forgot my team password (team name is TAANSTAFL or T.A.A.N.S.T.A.F.L.).. can you please confirm if we are registered for snackdown or not?
@ Kartik If you are not able
@ Kartik
If you are not able to log in then you are not registered for the contest.
@Aniruddha.....what do u
@Aniruddha.....what do u mean......i registered through the link in my mail....
wasnt the link for SNACKDOWN..........????
@ Nalin If you registered
@ Nalin
If you registered through that link then you should be able to log in using your team name and password. Since this is a team contest and more than one user uses the same team account we dont allow changing the team password.
@Aniruddha.....what do u
@Aniruddha.....what do u mean......i registered through the link in my mail....
wasnt the link for SNACKDOWN..........????
@Aniruddha.. honestly.. i
@Aniruddha.. honestly.. i forgot my team name.. is there any way of finding out my team the team name i am registered under. My team members include "Nitant" and "alphaq"
so can u pls tell me my team
so can u pls tell me my team name.......i have forgotten....if it is "nnnn" or "nnnn1".........!!!
pls mail my team name at my
pls mail my team name at my email........
and if it is "nnnn" then I am
and if it is "nnnn" then I am logged in with my team name already.......
for input number of 1000000,
for input number of 1000000, we are getting high runtime...so what can be the maximum possible number allowed in the input?in the testcase will there be any number as large as 1000000?
HEY ADMIN....... my code is
HEY ADMIN.......
my code is in JAVA and is showing following error.....
spoj: The program compiled successfully, but Main.class was not found. Class Main should contain method: public static void main (String[] args).
but i have a main method....am i supposed to submit my code using "Netbeans"...
pls help.......
@ Nalin You had to register
@ Nalin
You had to register separately for snackdown. If you are already logged in with some team name you need to make sure that it is the same as the one registered for snackdown. If you are not able to submit a solution then you are not logged in with the team name you registered for this contest. We dont allow retrieving user names and passwords.
@ Arit There can be an input
@ Arit
There can be an input with n = 1000000. But not more than that.
HEY ADMIN....... my code is
HEY ADMIN.......
my code is in JAVA and is showing following error.....
spoj: The program compiled successfully, but Main.class was not found. Class Main should contain method: public static void main (String[] args).
but i have a main method....am i supposed to submit my code using "Netbeans"...else my program is running correctly....
pls help.......
@Aniruddha.. is there no way
@Aniruddha.. is there no way of finding out my team name.. i've already solved two questions.. please email me at my account's email address if privacy is an issue.
Hey can anybody tell me the
Hey can anybody tell me the trick how to get the code working for n=1000000, it is taking too long.
My code is working fine for smaller inputs
plz help me out.....anybody
yaar time complexity ki
yaar time complexity ki problem aa rahi hai kuch to help karo :(
my program when submitted
my program when submitted shows running only for more than 2 minutes
WTH? Couldnt Submit. Same
WTH?
Couldnt Submit. Same Restricted Content Crap.
Worked my brain off on this one. Solved it and Couldn't submit in the end.
Not happy with the event.
ReEvent.
where is the link for
where is the link for submission??
I m unale to find the link
I m unale to find the link for sublmission of soutions
HOW come tnu2 bcome eligible
HOW come tnu2 bcome eligible for MUMBAI finals.. isn't the contest for students of indian universities.. eh?
when will these problems be
when will these problems be shifted to practice section ?
The problems are now in the
The problems are now in the practice section.