Search found 29 matches

by Archangel
Mon Jul 15, 2002 4:23 am
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

You wisdom really do me a great favor. I finally got accept!! Thank you for paying so much attention to my problem :D
by Archangel
Sun Jul 14, 2002 9:11 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

Null terminate?? I think my code doesn't need it. Because phone is a array with fixed 8 element. Every time if you read in a phone number, the phone number will overwrite the phone array completely. And my code will output 0.6 as 0.60 because of this line " cout.precision(2)" . I still don't know wh...
by Archangel
Sat Jul 13, 2002 2:46 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

Sorry~my code is not clear..In my code TimeSH is a one dimension array to store the input data (starting hour) TimeSM(starting minute),TimeEH(ending hour),TimeEM(ending minute) are the same. Because these four array's type is "char", so I must change the type so that I can assign the right value to ...
by Archangel
Sat Jul 06, 2002 10:38 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

:( I check many times..but still can't figure out the reason why I got WA.. Can anybody take a look of my code??....Thanks a lot!! #include<iostream.h> #include<string.h> #define day 8 #define evening 18 #define night 22 char step,phone[8],TimeSH[2],TimeSM[2],TimeEH[2],TimeEM[2]; short int StartH,St...
by Archangel
Fri Jul 05, 2002 8:23 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

You guess right! I use many "if else"...My algorithm: if Start_hour > End_hour { if Start_hour is in the day { if End_hour is in the day .......(assign time of day,night,evening) if End_hour is in the evening ....... if End_hour is in the night ....... } if Start_hour is in the evening { if End_hour...
by Archangel
Fri Jul 05, 2002 7:42 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

Can the input of reversed order of hour and minute be possible?? Although I can handle the 24 hours , I still got WA.. :(
by Archangel
Fri Jul 05, 2002 7:18 pm
Forum: Volume 1 (100-199)
Topic: 145 - Gondwanaland Telecom
Replies: 62
Views: 8038

145 - Gondwanaland Telecom

Are there any tricky input in this problem??...I got wrong answer in this problem... :(
Thanks
by Archangel
Wed Jul 03, 2002 10:28 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8289

A little question~^^
What should be the output when this kind of input?

01 abcd$20
012 efgh$30
000000
012345 40
#

The output should be "unknown" or "abcd"?? :D
by Archangel
Sat Jun 29, 2002 6:03 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20513

Thank you~^^...but for the input "1024 243", my program gave me the right answer..."121 3367".

Will the input number out of the range of "unsigned Integer" be possible(21474836648~-21474836647)?? (because I declear my variable as Integer type)
by Archangel
Fri Jun 28, 2002 4:09 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20513

I modified my code again...to let the output of "2 1" to be "1 3" and "1 1" to be "0 1",but still wrong answer again...>.<
by Archangel
Fri Jun 28, 2002 2:17 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20513

I had rewrote my program to let the output be "0 n" when any input of the form "1 n", but I still got wrong answer... :cry:
Did I still miss something?...Thanks!!
by Archangel
Fri Jun 28, 2002 9:20 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20513

Help Problem107

I try may input but still got wrong answer :cry: !! Can anyone help me?? #include<stdio.h> unsigned int height,one_num,temp,count,i,j,non_work,total_height,temp2; int power_check,power_check2; main() { while(scanf("%d %d",&height,&one_num) != 0) { if((height == 0)&&(one_num == 0)) /* end of input */...
by Archangel
Thu Jun 27, 2002 1:14 pm
Forum: Volume 1 (100-199)
Topic: 106 - Fermat vs. Pythagoras
Replies: 138
Views: 12143

Thanks for all of you pay attention for my problem!!

The problem has been solved~thanks!! :lol:
by Archangel
Wed Jun 26, 2002 9:16 am
Forum: Volume 1 (100-199)
Topic: 106 - Fermat vs. Pythagoras
Replies: 138
Views: 12143

WA on problem 106

:cry: Can anybody help me why I always got Wrong answer on this problem?..thanks a lot!! #include<stdio.h> long count,upper_bound; long list_count; long m,n,x,y,z,o,temp_z; long re_prime(long num1, long num2) { int r; do { r = num1 % num2; num1 = num2; num2 = r; } while (r != 0); return num1; } main...

Go to advanced search