用户输出
6
1
9999999966
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#81526 | #1304. zxh的派系共识 | Wrong Answer | 50 | 150 ms | 424 K | C++ 11 (Clang) / 580 B | 15291309895 | 2022-11-14 16:20:17 |
#include <bits/stdc++.h>
typedef long long ll;
ll GetPhi(ll num) {
ll phi = num;
if (num == 1)
return 1;
for (ll i = 2; i * i <= num; i++) {
if (num % i == 0) {
phi -= num / i;
while (num % i == 0) num /= i;
}
}
if (num > 1)
phi--;
return phi;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll T;
int main() {
scanf("%lld", &T);
for (ll i = 0, a, m; i < T; i++) {
scanf("%lld %lld", &a, &m);
printf("%lld\n", GetPhi(m / gcd(a, m)));
}
return 0;
}
用户输出
6
1
9999999966
系统信息
Exited with return code 0
用户输出
1
2
2
4
1
6
4
6
4
10
系统信息
Exited with return code 0
用户输出
12
52
2
43
2
18
28
58
2
60
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
33
102
51
9
52
106
18
108
10
73
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
75
16
65
123
25
156
78
52
16
137
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
100
173
33
40
102
137
103
189
62
210
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
41
229
126
152
128
256
85
221
116
173
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
5882304938 9999763901
9505722760 9999966511
5805364980 9999170087
9810619921 9999771101
5506
<1048 bytes omitted>
9999563904
9999766512
9998970096
9999571104
9998374464
9998975376
9998581824
9999783360
9998
<500 bytes omitted>
用户输出
9999663711
9999866327
9999069917
9999670931
9998474295
9999075213
9998681681
9999883229
9998486483
9998886919
9996893099
9997493
<422 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
6891776487 9999998023
4734215850 9999998027
3759181425 9999998083
3605139012 9999998123
3468
<1047 bytes omitted>
9999998022
9999998026
9999998082
9999998122
9999998136
9999998146
9999998148
9999998158
9999
<500 bytes omitted>
用户输出
9999998022
9999998026
9999998082
9999998122
9999998136
9999998146
9999998148
9999998158
9999998190
9999998230
9999998232
9999998
<422 bytes omitted>
系统信息
Exited with return code 0
50
3196991747 7556064528
1046365130 8269632992
610034468 4621492906
5332350866 6827878205
27612
<1024 bytes omitted>
2370525696
2067408240
2279092320
5453181136
5654536848
1899912960
420206400
1159047360
31260
<483 bytes omitted>
用户输出
3611354369
2067408247
2279092391
5460022804
5654537465
1981697842
420210659
1574373641
3138376837
209447482
1647682577
411676623
<406 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
3235271017 5751345600
6117973023 6299092800
650281279 6518191680
5197907098 6616209600
34383
<1045 bytes omitted>
104509440
364953600
1114767360
597196800
18247680
8257536
11197440
1393459200
681246720
232
<431 bytes omitted>
用户输出
258639361
1036657057
3222555799
1619505220
44727087
21258130
25305871
3720427676
1928377959
560998416
209620250
13067150
2096477
<372 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
6983776799 6983776800
6983776799 6983776800
6983776799 6983776800
6983776799 6983776800
6983
<1052 bytes omitted>
1194393600
1194393600
1194393600
1194393600
1194393600
1194393600
1194393600
1194393600
1194
<500 bytes omitted>
用户输出
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473379
3417473
<422 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
9311702399 9311702400
9311702399 9311702400
9311702399 9311702400
9311702399 9311702400
9311
<1052 bytes omitted>
1592524800
1592524800
1592524800
1592524800
1592524800
1592524800
1592524800
1592524800
1592
<500 bytes omitted>
用户输出
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934629
4629934
<422 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
50
240158472 240160776
240155112 240160776
240040824 240160776
240040968 240160776
240063864 24
<894 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
10006603 10006699
10006463 10006699
10001701 10006699
10001707 10006699
10002661 10006699
1
<764 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
5123380736 5123429888
5123309056 5123429888
5120870912 5123429888
5120873984 5123429888
5121
<994 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
2431604529 2431627857
2431570509 2431627857
2430413343 2431627857
2430414801 2431627857
2430
<994 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
1200792360 1200803880
1200775560 1200803880
1200204120 1200803880
1200204840 1200803880
1200
<978 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
1250825375 1250837375
1250807875 1250837375
1250212625 1250837375
1250213375 1250837375
1250
<978 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0
50
2501650750 2501674750
2501615750 2501674750
2500425250 2501674750
2500426750 2501674750
2500
<994 bytes omitted>
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
<397 bytes omitted>
用户输出
10006698
10006698
10006698
10006698
10006698
19260816
10006698
10006698
10006698
10006698
10006602
10006602
10006602
10006602
19
<319 bytes omitted>
系统信息
Exited with return code 0