Search found 8 matches

by Tiramisu
Fri Mar 27, 2015 10:27 pm
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 28463

Re: 112 - Tree Summing

Thanks a lot, don't know why i was checking for sum=n outside the loop! :( now got accepted!!
by Tiramisu
Fri Mar 27, 2015 8:05 am
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 22248

Re: 202 - Repeating Decimals

try input
1 2222
correct output:
1/2222 = 0.0(0045)
4 = number of digits in repeating cycle
but your output:
1/2222 = 0.000(4500)
4 = number of digits in repeating cycle

seems like you are checking for a cyclic pattern from right to left, but it should be from left to right.
by Tiramisu
Fri Mar 27, 2015 3:59 am
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 22248

Re: 202 - Repeating Decimals

to atul_pust
2nd line of output should have three preceding spaces wheres your code has only one.

76/25 = 3.04(0)
^^^1 = number of digits in repeating cycle
by Tiramisu
Fri Mar 27, 2015 1:14 am
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 28463

Re: 112 - Tree Summing

removed code after AC
by Tiramisu
Thu Mar 26, 2015 7:16 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 62652

Re: 10013 - Super long sums

you have to dynamically allocate memory for such large arrays, so instead of int num1[m] num2[m]
do this:
int* num1 = new int[1000000];
int* num2 = new int[1000000];
when you are done with all computation free these arrays like:
delete[] num1;
delete[] num2;
by Tiramisu
Tue Feb 24, 2015 10:06 pm
Forum: Volume 3 (300-399)
Topic: 338 - Long Multiplication
Replies: 59
Views: 13254

Re: 338 - Long Multiplication

got your point. but when I submitted my code, I actually removed those two comments. I was not sure about where to print a newline, I tried different combinations, got PE for all of those(not WA!!). So i guess there is something I am missing. i am a novice programmer, so it just can be a very silly ...
by Tiramisu
Tue Feb 24, 2015 2:24 am
Forum: Volume 3 (300-399)
Topic: 338 - Long Multiplication
Replies: 59
Views: 13254

Re: 338 - Long Multiplication

AC :D
by Tiramisu
Fri Feb 20, 2015 9:37 pm
Forum: Volume 3 (300-399)
Topic: 338 - Long Multiplication
Replies: 59
Views: 13254

Re: 338 - Long Multiplication

I am getting PE. can anyone tell me why??? between two outputs there should be a blank line, what about the last one? here's some input output from my code: input 123456 4324 12234 909 454609 45606 234 0 0 3434 234 657567 345 200 200 345 0 output 123456 4324 ------ 493824 246912 370368 493824 ------...

Go to advanced search