QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502952#5628. Immortal Porpoisesxiaowuc1100 ✓2ms4060kbC++171.4kb2024-08-03 15:37:562024-08-03 15:37:57

詳細信息


Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 2ms
memory: 4060kb

input:

100
1 1
2 2
3 8
4 20
5 46
6 60
7 3749999998
8 3749999999
9 3750000000
10 3750000001
11 281474976710656
12 281474976710655
13 281474976710654
14 281474976710653
15 281474976710652
16 281474976710651
17 281474976710650
18 281474976710649
19 281474976710648
20 281474976710647
21 281474976710646
22 2814...

output:

1 1
2 1
3 21
4 6765
5 836311903
6 8755920
7 499999999
8 500000001
9 0
10 500000001
11 309764667
12 978079970
13 331684697
14 646395273
15 685289424
16 961105849
17 724183575
18 236922274
19 487261301
20 749660973
21 737600328
22 12060645
23 725539683
24 286520962
25 439018721
26 847502241
27 5915164...

result:

ok 100 lines