用户输出
2
1000 32000
32000 1000
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#111247 | #1125. zxh的国土无双 | Accepted | 100 | 259 ms | 500 K | C / 1.1 K | JH | 2024-07-10 18:38:12 |
#include <stdio.h>
#include <math.h>
typedef unsigned long long ull;
ull gcd(ull a, ull b);
int main() {
ull x, y;
scanf("%llu %llu", &x, &y);
if (y % x != 0) {
printf("0\n");
return 0;
}
ull xy = y / x;
ull sqrt_xy = (ull)sqrt(xy);
int count = 0;
ull results[100000][2];
for (ull i = 1; i <= sqrt_xy; ++i) {
if (xy % i == 0) {
ull j = xy / i;
if (gcd(i, j) == 1) {
results[count][0] = i * x;
results[count][1] = j * x;
count++;
if (i != j) {
results[count][0] = j * x;
results[count][1] = i * x;
count++;
}
}
}
}
printf("%d\n", count);
for (int i = 0; i < count; ++i) {
printf("%llu %llu\n", results[i][0], results[i][1]);
}
return 0;
}
ull gcd(ull a, ull b) {
while (b) {
ull temp = b;
b = a % b;
a = temp;
}
return a;
}
用户输出
2
1000 32000
32000 1000
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
1
24000 24000
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
8
283 834468949839
834468949839 283
849 278156316613
278156316613 849
1981 119209849977
119209
<49 bytes omitted>
用户输出
8
283 834468949839
834468949839 283
849 278156316613
278156316613 849
1981 119209849977
119209849977 1981
5943 39736616659
39736
<12 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
32
44 454817853336
454817853336 44
88 227408926668
227408926668 88
132 151605951112
1516059511
<456 bytes omitted>
用户输出
32
44 454817853336
454817853336 44
88 227408926668
227408926668 88
132 151605951112
151605951112 132
264 75802975556
75802975556
<395 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
16
125 303851909375
303851909375 125
3125 12154076375
12154076375 3125
8375 4535103125
4535103
<186 bytes omitted>
用户输出
16
125 303851909375
303851909375 125
3125 12154076375
12154076375 3125
8375 4535103125
4535103125 8375
42875 885865625
885865625
<141 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
128
457 368538658068
368538658068 457
1371 122846219356
122846219356 1371
1828 92134664517
921
<2243 bytes omitted>
用户输出
128
457 368538658068
368538658068 457
1371 122846219356
122846219356 1371
1828 92134664517
92134664517 1828
3199 52648379724
526
<2086 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
16
447 762459896586
762459896586 447
894 381229948293
381229948293 894
19221 17731625502
17731
<196 bytes omitted>
用户输出
16
447 762459896586
762459896586 447
894 381229948293
381229948293 894
19221 17731625502
17731625502 19221
38442 8865812751
8865
<151 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
64
1 953671355196
953671355196 1
3 317890451732
317890451732 3
4 238417838799
238417838799 4
<928 bytes omitted>
用户输出
64
1 953671355196
953671355196 1
3 317890451732
317890451732 3
4 238417838799
238417838799 4
7 136238765028
136238765028 7
12 79
<835 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
32
1 75953824090
75953824090 1
2 37976912045
37976912045 2
5 15190764818
15190764818 5
10 759
<378 bytes omitted>
用户输出
32
1 75953824090
75953824090 1
2 37976912045
37976912045 2
5 15190764818
15190764818 5
10 7595382409
7595382409 10
193 393543130
<317 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
8
2 959796438278
959796438278 2
118 16267736242
16267736242 118
55166 34796666
34796666 55166
<33 bytes omitted>
用户输出
8
2 959796438278
959796438278 2
118 16267736242
16267736242 118
55166 34796666
34796666 55166
589774 3254794
3254794 589774
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
8
1 612720601101
612720601101 1
7 87531514443
87531514443 7
9 68080066789
68080066789 9
63 97
<25 bytes omitted>
用户输出
8
1 612720601101
612720601101 1
7 87531514443
87531514443 7
9 68080066789
68080066789 9
63 9725723827
9725723827 63
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
64
1 571168626590
571168626590 1
2 285584313295
285584313295 2
5 114233725318
114233725318 5
<912 bytes omitted>
用户输出
64
1 571168626590
571168626590 1
2 285584313295
285584313295 2
5 114233725318
114233725318 5
10 57116862659
57116862659 10
47 12
<819 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
4
1 816033297854
816033297854 1
2 408016648927
408016648927 2
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
8
1 722299806965
722299806965 1
5 144459961393
144459961393 5
11 65663618815
65663618815 11
5
<31 bytes omitted>
用户输出
8
1 722299806965
722299806965 1
5 144459961393
144459961393 5
11 65663618815
65663618815 11
55 13132723763
13132723763 55
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
4
9 801129705372
801129705372 9
36 200282426343
200282426343 36
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
16
1 456969613602
456969613602 1
2 228484806801
228484806801 2
3 152323204534
152323204534 3
<156 bytes omitted>
用户输出
16
1 456969613602
456969613602 1
2 228484806801
228484806801 2
3 152323204534
152323204534 3
6 76161602267
76161602267 6
17 2688
<111 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
1 624379090109
624379090109 1
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 344111137370
344111137370 1
2 172055568685
172055568685 2
5 68822227474
68822227474 5
<15818 bytes omitted>
用户输出
1024
1 344111137370
344111137370 1
2 172055568685
172055568685 2
5 68822227474
68822227474 5
7 49158733910
49158733910 7
10 3441
<14765 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
256
1 947358776276
947358776276 1
4 236839694069
236839694069 4
11 86123525116
86123525116 11
<3995 bytes omitted>
用户输出
256
1 947358776276
947358776276 1
4 236839694069
236839694069 4
11 86123525116
86123525116 11
23 41189512012
41189512012 23
44 2
<3710 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
512
1 740168683044
740168683044 1
3 246722894348
246722894348 3
4 185042170761
185042170761 4
<8027 bytes omitted>
用户输出
512
1 740168683044
740168683044 1
3 246722894348
246722894348 3
4 185042170761
185042170761 4
7 105738383292
105738383292 7
12 6
<7486 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 844023861030
844023861030 1
2 422011930515
422011930515 2
3 281341287010
281341287010 3
<16214 bytes omitted>
用户输出
1024
1 844023861030
844023861030 1
2 422011930515
422011930515 2
3 281341287010
281341287010 3
5 168804772206
168804772206 5
6 1
<15161 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 789491706234
789491706234 1
2 394745853117
394745853117 2
3 263163902078
263163902078 3
<16190 bytes omitted>
用户输出
1024
1 789491706234
789491706234 1
2 394745853117
394745853117 2
3 263163902078
263163902078 3
6 131581951039
131581951039 6
7 1
<15137 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 776505385110
776505385110 1
2 388252692555
388252692555 2
3 258835128370
258835128370 3
<16176 bytes omitted>
用户输出
1024
1 776505385110
776505385110 1
2 388252692555
388252692555 2
3 258835128370
258835128370 3
5 155301077022
155301077022 5
6 1
<15123 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 433304299740
433304299740 1
3 144434766580
144434766580 3
4 108326074935
108326074935 4
<15914 bytes omitted>
用户输出
1024
1 433304299740
433304299740 1
3 144434766580
144434766580 3
4 108326074935
108326074935 4
5 86660859948
86660859948 5
12 36
<14861 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
512
1 348510998660
348510998660 1
4 87127749665
87127749665 4
5 69702199732
69702199732 5
11
<7859 bytes omitted>
用户输出
512
1 348510998660
348510998660 1
4 87127749665
87127749665 4
5 69702199732
69702199732 5
11 31682818060
31682818060 11
17 20500
<7318 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
1024
1 642016938420
642016938420 1
4 160504234605
160504234605 4
5 128403387684
128403387684 5
<16086 bytes omitted>
用户输出
1024
1 642016938420
642016938420 1
4 160504234605
160504234605 4
5 128403387684
128403387684 5
9 71335215380
71335215380 9
11 58
<15033 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
2048
1 200560490130
200560490130 1
2 100280245065
100280245065 2
3 66853496710
66853496710 3
<31252 bytes omitted>
用户输出
2048
1 200560490130
200560490130 1
2 100280245065
100280245065 2
3 66853496710
66853496710 3
5 40112098026
40112098026 5
6 33426
<29175 bytes omitted>
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
341353499290 682706998580
682706998580 341353499290
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
1
545434896413 545434896413
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
404822138341 809644276682
809644276682 404822138341
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
1
277417427092 277417427092
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
347710816904 695421633808
695421633808 347710816904
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
28150115079 478551956343
478551956343 28150115079
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
99787625634 498938128170
498938128170 99787625634
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
4
16535387753 198424653036
198424653036 16535387753
49606163259 66141551012
66141551012 49606163
<5 bytes omitted>
用户输出
4
16535387753 198424653036
198424653036 16535387753
49606163259 66141551012
66141551012 49606163259
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
2
87178876849 784609891641
784609891641 87178876849
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
4
33540566239 402486794868
402486794868 33540566239
100621698717 134162264956
134162264956 10062
<9 bytes omitted>
用户输出
4
33540566239 402486794868
402486794868 33540566239
100621698717 134162264956
134162264956 100621698717
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0
用户输出
0
Special Judge 信息
Accepted!
系统信息
Exited with return code 0