QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#640501#6262. Jazz it Up!dohoon#AC ✓0ms3704kbC++17273b2024-10-14 13:44:122024-10-14 13:44:12

Judging History

你现在查看的是最新测评结果

  • [2024-10-14 13:44:12]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3704kb
  • [2024-10-14 13:44:12]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

signed main() {
    cin.tie(0)->sync_with_stdio(0);
    ll n; cin >> n;
    for (ll i = 2; i < n; ++i) {
        if (gcd(n,i)==1){
            cout<<i;
            return 0;
        }
    }
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3624kb

input:

3

output:

2

result:

ok correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

30

output:

7

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

13

output:

2

result:

ok correct

Test #4:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

11

output:

2

result:

ok correct

Test #5:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

13

output:

2

result:

ok correct

Test #6:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

14

output:

3

result:

ok correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3

output:

2

result:

ok correct

Test #8:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

30030

output:

17

result:

ok correct

Test #9:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

5

output:

2

result:

ok correct

Test #10:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

6

output:

5

result:

ok correct

Test #11:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

7

output:

2

result:

ok correct

Test #12:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

8633

output:

2

result:

ok correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

89

output:

2

result:

ok correct

Test #14:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

9026

output:

3

result:

ok correct

Test #15:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

9217

output:

2

result:

ok correct

Test #16:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

9410

output:

3

result:

ok correct

Test #17:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

9605

output:

2

result:

ok correct

Test #18:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

99929

output:

2

result:

ok correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

99961

output:

2

result:

ok correct

Test #20:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

99971

output:

2

result:

ok correct

Test #21:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

99989

output:

2

result:

ok correct

Test #22:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

99991

output:

2

result:

ok correct

Test #23:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

96331

output:

2

result:

ok correct

Test #24:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

24213

output:

2

result:

ok correct

Test #25:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

52259

output:

2

result:

ok correct

Test #26:

score: 0
Accepted
time: 0ms
memory: 3508kb

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: 3556kb

input:

97589

output:

2

result:

ok correct

Test #29:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

30030

output:

17

result:

ok correct

Test #30:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

11663

output:

2

result:

ok correct

Test #31:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

14351

output:

2

result:

ok correct

Test #32:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

17947

output:

2

result:

ok correct

Test #33:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

20711

output:

2

result:

ok correct

Test #34:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

23707

output:

2

result:

ok correct

Test #35:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

27221

output:

2

result:

ok correct

Test #36:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

30967

output:

2

result:

ok correct

Test #37:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

34571

output:

2

result:

ok correct

Test #38:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

38021

output:

2

result:

ok correct

Test #39:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

199

output:

2

result:

ok correct

Test #40:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

7429

output:

2

result:

ok correct

Test #41:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

33263

output:

2

result:

ok correct

Test #42:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

82861

output:

2

result:

ok correct

Test #43:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

3127

output:

2

result:

ok correct

Test #44:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

4087

output:

2

result:

ok correct

Test #45:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

5183

output:

2

result:

ok correct

Test #46:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

6557

output:

2

result:

ok correct

Test #47:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

8633

output:

2

result:

ok correct

Test #48:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

10403

output:

2

result:

ok correct

Test #49:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

85263

output:

2

result:

ok correct

Test #50:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

84101

output:

2

result:

ok correct