QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#640515 | #6262. Jazz it Up! | chanuuu# | AC ✓ | 0ms | 3688kb | C++17 | 248b | 2024-10-14 13:52:35 | 2024-10-14 13:52:37 |
Judging History
answer
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main(){
ll n; cin>>n;
for(int k = 2; k < n; k++){
if(gcd(n, k) == 1) {
cout<<k;
return 0;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
3
output:
2
result:
ok correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
30
output:
7
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
13
output:
2
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
11
output:
2
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
13
output:
2
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
14
output:
3
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
3
output:
2
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
30030
output:
17
result:
ok correct
Test #9:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
5
output:
2
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
6
output:
5
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
7
output:
2
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
8633
output:
2
result:
ok correct
Test #13:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
89
output:
2
result:
ok correct
Test #14:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
9026
output:
3
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
9217
output:
2
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
9410
output:
3
result:
ok correct
Test #17:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
9605
output:
2
result:
ok correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
99929
output:
2
result:
ok correct
Test #19:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
99961
output:
2
result:
ok correct
Test #20:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
99971
output:
2
result:
ok correct
Test #21:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
99989
output:
2
result:
ok correct
Test #22:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
99991
output:
2
result:
ok correct
Test #23:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
96331
output:
2
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
24213
output:
2
result:
ok correct
Test #25:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
52259
output:
2
result:
ok correct
Test #26:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
99123
output:
2
result:
ok correct
Test #27:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
43498
output:
3
result:
ok correct
Test #28:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
97589
output:
2
result:
ok correct
Test #29:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
30030
output:
17
result:
ok correct
Test #30:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
11663
output:
2
result:
ok correct
Test #31:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
14351
output:
2
result:
ok correct
Test #32:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
17947
output:
2
result:
ok correct
Test #33:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
20711
output:
2
result:
ok correct
Test #34:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
23707
output:
2
result:
ok correct
Test #35:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
27221
output:
2
result:
ok correct
Test #36:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
30967
output:
2
result:
ok correct
Test #37:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
34571
output:
2
result:
ok correct
Test #38:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
38021
output:
2
result:
ok correct
Test #39:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
199
output:
2
result:
ok correct
Test #40:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
7429
output:
2
result:
ok correct
Test #41:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
33263
output:
2
result:
ok correct
Test #42:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
82861
output:
2
result:
ok correct
Test #43:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
3127
output:
2
result:
ok correct
Test #44:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
4087
output:
2
result:
ok correct
Test #45:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
5183
output:
2
result:
ok correct
Test #46:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
6557
output:
2
result:
ok correct
Test #47:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
8633
output:
2
result:
ok correct
Test #48:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
10403
output:
2
result:
ok correct
Test #49:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
85263
output:
2
result:
ok correct
Test #50:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
84101
output:
2
result:
ok correct