All about problems in Volume CXII. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
by hamedv » Sun Jun 10, 2007 5:43 pm
What's wrong with my code?
I got WA several times;
- Code: Select all
GOT AC
Last edited by
hamedv on Sun Jun 10, 2007 6:34 pm, edited 1 time in total.
-
hamedv
- Learning poster
-
- Posts: 98
- Joined: Mon May 07, 2007 8:30 am
by helloneo » Sun Jun 10, 2007 5:58 pm
Try this case..
- Code: Select all
1
01/01/2004
02/01/2004
My output is..
- Code: Select all
Case #1: Invalid birth date
-
helloneo
- Guru
-
- Posts: 516
- Joined: Mon Jul 04, 2005 6:30 am
- Location: Seoul, Korea
by hamedv » Sun Jun 10, 2007 6:12 pm
I changed my code
but i got WA
- Code: Select all
GOT AC
Last edited by
hamedv on Sun Jun 10, 2007 6:33 pm, edited 1 time in total.
-
hamedv
- Learning poster
-
- Posts: 98
- Joined: Mon May 07, 2007 8:30 am
by sunny » Sun Jun 10, 2007 6:21 pm
- Code: Select all
02/01/2130
01/01/2000
- Code: Select all
130
-
sunny
- Experienced poster
-
- Posts: 124
- Joined: Sun Sep 11, 2005 10:22 pm
- Location: Civil-BUET
by bishop » Sun Jun 10, 2007 9:09 pm
i cannot find any solution
why that is WA
i checked all the input
all right
- Code: Select all
Last edited by
bishop on Sun Jun 10, 2007 11:40 pm, edited 1 time in total.
-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
by jan_holmes » Sun Jun 10, 2007 9:26 pm
Try this input :
- Code: Select all
1
01/01/2031
02/01/1900
The output should be :
- Code: Select all
Case #1: 130
-
jan_holmes
- Experienced poster
-
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
-
by bishop » Sun Jun 10, 2007 10:21 pm
but still WA
ur input
is correct for
this code
- Code: Select all
Last edited by
bishop on Sun Jun 10, 2007 11:39 pm, edited 1 time in total.
-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
by jan_holmes » Sun Jun 10, 2007 10:27 pm
Then, check for this one :
- Code: Select all
1
02/02/2031
02/02/1900
The output should be :
- Code: Select all
Case #1: Check birth date
EDIT : Sorry, It should be "Check birth date"
-
jan_holmes
- Experienced poster
-
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
-
by bishop » Sun Jun 10, 2007 10:44 pm
it
is checked
- Code: Select all
what should i do wit it
Last edited by
bishop on Sun Jun 10, 2007 11:39 pm, edited 1 time in total.
-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
by jan_holmes » Sun Jun 10, 2007 10:50 pm
Now, Try :
- Code: Select all
1
01/02/2031
01/02/2031
Should be :
- Code: Select all
Case #1: 0
-
jan_holmes
- Experienced poster
-
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
-
by bishop » Sun Jun 10, 2007 10:57 pm
yaa that was fault
if(m1>=m2)
printf("0\n");
else
printf("Invalid birth date\n
still WA
-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
by jan_holmes » Sun Jun 10, 2007 11:06 pm
How 'bout this one :
- Code: Select all
1
02/02/2031
03/02/2031
Output :
- Code: Select all
Case #1: Invalid birth date
-
jan_holmes
- Experienced poster
-
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
-
by bishop » Sun Jun 10, 2007 11:15 pm
my code could not give any ans
for same date
but now it gives
- Code: Select all
still WA
Last edited by
bishop on Sun Jun 10, 2007 11:38 pm, edited 1 time in total.
-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
by jan_holmes » Sun Jun 10, 2007 11:28 pm
Hmmm.... Check this also :
- Code: Select all
1
02/02/2031
03/01/2031
Output :
- Code: Select all
Case #1: 0
-
jan_holmes
- Experienced poster
-
- Posts: 136
- Joined: Fri Apr 15, 2005 3:47 pm
- Location: Singapore
-
by bishop » Sun Jun 10, 2007 11:38 pm
at last
accepted
the ACM 11219
thanx jan_holmes
for giving input
and output
which help me

-
bishop
- New poster
-
- Posts: 43
- Joined: Fri May 04, 2007 12:57 pm
Return to Volume CXII
Who is online
Users browsing this forum: No registered users and 0 guests