10070 - Leap Year or Not Leap Year and ...

All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Ferdous
New poster
Posts: 26
Joined: Sun Dec 14, 2003 1:17 pm
Location: Dhaka, Bangladesh
Contact:

Post by Ferdous » Sun Mar 07, 2004 10:26 am

I changed it but still getting WA !!
changed form of bulukulu festival year test:

if((div400 || (div4 && !div100)) && (div5 && div11))
printf("This is bulukulu festival year.\n");
I am destined to live on this cruel world........

osan
New poster
Posts: 47
Joined: Tue Jul 29, 2003 12:03 pm
Location: Bangladesh,Dhaka.
Contact:

Ferdous

Post by osan » Tue Mar 09, 2004 7:10 pm

your output

for
55000
2200

This is bulukulu festival year.
This is bulukulu festival year.
output should be

This is an ordinary year.
This is an ordinary year.
this time WA
what next...............?

User avatar
_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

Is this Big Num problem??.

Post by _.B._ » Sun Mar 21, 2004 1:55 am

Greetings!.
Will QWord (0 .. 18446744073709551615) be good enough for this problem in Free Pascal?, or is this a Big Num problem?.
Have anyone tried it this way?.
Thanks in advance!.

_.B._

User avatar
shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

Post by shamim » Sun Mar 21, 2004 5:21 am

I don't think it will work since this is indeed a BigNum problem. The judge data normally contains some values larger than 10^100 so that the basic data types can not handle such number.

User avatar
_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

Ouch!.

Post by _.B._ » Sun Mar 21, 2004 6:16 am

Thanks shamim!.
Freaking Big Num problems... have to work on that :o
Later!, and keep posting!.

_.B._
http://online-judge.uva.es/cgi-bin/Onli ... Info:42085

User avatar
_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

BigNum indeed.

Post by _.B._ » Tue Jun 08, 2004 10:09 pm

Greetings!
Used length 1001 for the BigNums, and got WA.
Changed to 2001 and got ACed :D
Keep posting!
_.

Nikola
New poster
Posts: 3
Joined: Thu Aug 26, 2004 8:59 pm

Post by Nikola » Sun Aug 29, 2004 12:38 pm

hey! it's bulukulu, not buluculu!

Meng-Hsuan Wu
New poster
Posts: 5
Joined: Thu Aug 22, 2002 9:41 am
Location: Taiwan
Contact:

Re: 10070 Output Limit Exceeded

Post by Meng-Hsuan Wu » Fri Sep 03, 2004 5:08 pm

haaaz wrote:
Meng-Hsuan Wu wrote:This is my source code for problem 10070. When I ran it on my computer, it worked well when I input a long number. But I got "Output Limit Exceeded" when I submit it. Can anyone help me?
[c]#include <stdio.h>
#include <string.h>
main()
{
char s[10000];
int y[10000];
//...
[/c]
Maybe 10000 elements are not enough?
Thanks for your suggestion. One day in May 2004, I used getchar() continuously to read the year until I reached a "\n" instead of opening a long array to store it, and it worked out.

User avatar
alu_mathics
Learning poster
Posts: 55
Joined: Sat Jan 24, 2004 9:30 pm
Location: Chittagong
Contact:

Post by alu_mathics » Sat Sep 18, 2004 6:48 pm

try with this
2000
3600
4515
2001
22000
22055
22220
330000
330015
330220
456464484515645448647512343674234567564234564784234564754742345647424564
456464484515645448647512343674234567564234564784234564754742345647424565
456464484515645448647512343674234567564234564784234564754742345647424566
456464484515645448647512343674234567564234564784234564754742345647424567
456464484515645448647512343674234567564234564784234564754742345647424568
456464484515645448647512343674234567564234564784234564754742345647424569
456464484515645448647512343674234567564234564784234564754742345647424560
456464484515645448647512343674234567564234564784234564754742345647424500
234324234245646448451564544864751234367423456756423456478423456475474234564742456
23423423
65678645656377386585675675675622789235723451275172892374016526347623483274237487123848912347891237489123561237612734612375617234672461237123567123465781465714657136475617856127651237845173657813465781263478561234787856781349658716345786134785617823651782367845123675647823563784657834657834657834657861347856134785634786578134657816347856178567182346578134657823465723456123761789035617856163417454
838286831260478655
838286831260478400
838286831260478650
838286831260478655
228623681252857800
228623681252857815
228623681252857830
228623681252857810
2000
3600
4515
2001
Output:
This is leap year.

This is leap year.
This is huluculu festival year.

This is huluculu festival year.

This is an ordinary year.

This is leap year.
This is bulukulu festival year.

This is an ordinary year.

This is leap year.
This is bulukulu festival year.

This is leap year.
This is huluculu festival year.
This is bulukulu festival year.

This is huluculu festival year.

This is leap year.
This is bulukulu festival year.

This is leap year.

This is an ordinary year.

This is an ordinary year.

This is an ordinary year.

This is leap year.

This is an ordinary year.

This is leap year.
This is huluculu festival year.

This is huluculu festival year.

This is leap year.

This is an ordinary year.

This is an ordinary year.

This is huluculu festival year.

This is leap year.
This is huluculu festival year.

This is an ordinary year.

This is huluculu festival year.

This is huluculu festival year.

This is huluculu festival year.

This is huluculu festival year.

This is an ordinary year.

This is leap year.

This is leap year.
This is huluculu festival year.

This is huluculu festival year.

This is an ordinary year.
If you can pass this input , hope your code will get A.C.
cuii e

mikeblas
New poster
Posts: 6
Joined: Sat Mar 19, 2005 1:21 am

Re: HI~

Post by mikeblas » Sat Mar 19, 2005 1:30 am

[quote="10153EN"]In the problem description it states that "All the years will not be less than 2000 (to avoid the earlier different rules for leap years). Please don

User avatar
dovier_antonio
New poster
Posts: 47
Joined: Fri Feb 18, 2005 5:00 am
Location: Havana, Cuba

10070

Post by dovier_antonio » Tue Mar 22, 2005 6:04 pm

code removed...

Thanks...
Last edited by dovier_antonio on Fri Feb 03, 2012 9:46 am, edited 1 time in total.

User avatar
dovier_antonio
New poster
Posts: 47
Joined: Fri Feb 18, 2005 5:00 am
Location: Havana, Cuba

10070

Post by dovier_antonio » Tue Mar 22, 2005 6:35 pm

code removed...

thanks!
Last edited by dovier_antonio on Fri Feb 03, 2012 9:46 am, edited 2 times in total.

User avatar
dovier_antonio
New poster
Posts: 47
Joined: Fri Feb 18, 2005 5:00 am
Location: Havana, Cuba

Post by dovier_antonio » Tue Mar 22, 2005 6:43 pm

In my code I'm testing with 10000001,

In other words I say :

for any number n :

n is divisible by 3 :
If the sum of all digits are divisible by 3 too

n is divisible by 5 :
If the least digit is 0 or 5

n is divisible by 4 : ______
If the number made by the two least digits is divisible by 4 -----> xyrvab (4 / (10a + b))

n is divisible by 11 :
If the sum of all digits in positions odds, less, the sum of all digits in positions even are divisible by 11

n is divisible by 100 :
If the two leasts digits are 0s

n is divisible by 400 :
If the number made with the 4 leasts digits are divisible by 400


Please, help me! Thanks in advance!
Last edited by dovier_antonio on Fri Feb 03, 2012 9:48 am, edited 1 time in total.

User avatar
dovier_antonio
New poster
Posts: 47
Joined: Fri Feb 18, 2005 5:00 am
Location: Havana, Cuba

Post by dovier_antonio » Wed Mar 23, 2005 6:01 am

Now I got accepted!

Thanks!
Last edited by dovier_antonio on Fri Feb 03, 2012 9:48 am, edited 1 time in total.

User avatar
dovier_antonio
New poster
Posts: 47
Joined: Fri Feb 18, 2005 5:00 am
Location: Havana, Cuba

Post by dovier_antonio » Wed Mar 23, 2005 6:02 am

Now I got AC! Thanks...
Last edited by dovier_antonio on Fri Feb 03, 2012 9:48 am, edited 1 time in total.

Post Reply

Return to “Volume 100 (10000-10099)”