QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502971#5622. A Rational Sequencexiaowuc1100 ✓15ms10584kbPython3408b2024-08-03 15:40:322024-08-03 15:40:34

詳細信息


Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 15ms
memory: 10584kb

input:

1000
1 1/1
2 1/3
3 5/2
4 2178309/1346269
5 1/10000000
6 128/1
7 1/128
8 1073741823/127
9 153391689/1
10 256/1
11 1/256
12 357913941/85
13 1073741823/8
14 512/1
15 1/512
16 153391689/73
17 119304647/1
18 1024/1
19 1/1024
20 1049601/1
21 1073741823/10
22 2048/1
23 1/2048
24 1073741823/2047
25 97612893...

output:

1 1/2
2 3/2
3 2/5
4 1346269/1860498
5 10000000/9999999
6 1/129
7 128/127
8 127/1073741944
9 1/153391690
10 1/257
11 256/255
12 85/357913984
13 8/1073741817
14 1/513
15 512/511
16 73/153391760
17 1/119304648
18 1/1025
19 1024/1023
20 1/1049602
21 10/1073741827
22 1/2049
23 2048/2047
24 2047/107374336...

result:

ok 1000 lines