Page 1 of 1

archive 3015 - Zeros and Ones

Posted: Wed Jun 08, 2005 5:04 pm
by Sanny
Anybody can check this i/o please. I'm getting WA :(


Input:

Code: Select all

15
1 0
63 100
64 1
64 0
53 53
54 54
50 99
10 100
25 25
64 100
6 3
6 4
6 2
26 3
64 2
Output:

Code: Select all

Case 1: 0
Case 2: 0
Case 3: 916312070471295267
Case 4: 916312070471295267
Case 5: 0
Case 6: 18358397026615
Case 7: 637606458151
Case 8: 0
Case 9: 0
Case 10: 9308567063712721
Case 11: 1
Case 12: 3
Case 13: 6
Case 14: 1662453
Case 15: 465428353255261088
Regards
Sanny

Posted: Thu Jun 09, 2005 4:55 pm
by sidky
My AC code gives this output

Code: Select all

Case 1: 0
Case 2: 0
Case 3: 916312070471295267
Case 4: 0
Case 5: 0
Case 6: 18358397026615
Case 7: 637606458151
Case 8: 0
Case 9: 0
Case 10: 9308567063712721
Case 11: 1
Case 12: 3
Case 13: 6
Case 14: 1662453
Case 15: 465428353255261088

Posted: Thu Jun 09, 2005 5:00 pm
by Sanny
Got AC now. My mistake was when K=0. Thanks.