buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
k=int(input())
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
if(i%k==0):
c=c+1
if(c==0):
print("NG")
else:
print("OK")
| k=int(input())
a,b=map(int,input().split())
c=0
for i in range(a,b+1):
if(i%k==0):
c=c+1
if(c==0):
print("NG")
else:
print("OK")
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 74 |
k = int(input())
a,b = map(int,input().split())
for i in range(b-a+1):
if a % k != 0:
a += 1
else:
print('OK')
break
if a == b and b%k != 0:
print('NG') | k = int(input())
a,b = map(int,input().split())
for i in range(b-a+1):
if a % k != 0:
a += 1
else:
print('OK')
break
if a == b+1 and b%k != 0:
print('NG') | [["+", 0, 57, 15, 679, 31, 666, 0, 657, 17, 72], ["+", 0, 57, 15, 679, 31, 666, 0, 657, 12, 612]] | 5 | 72 |
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
if i&k==0:
print("OK")
else:
print("NG")
| k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
if i%k==0:
print("OK")
break
else:
print("NG")
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 67], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 57 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
for (int i = b; i <= c; i++) {
if (i % a == 0) {
printf("ok\n");
return 0;
}
}
printf("NG\n");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
int a, b, c;
scanf("%d\n%d%d", &a, &b, &c);
for (int i = b; i <= c; i++) {
if (i % a == 0) {
printf("OK\n");
return 0;
}
}
printf("NG\n");
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K;
cin >> A >> B >> K;
if (A % K == 0) {
cout << "OK" << endl;
} else if ((B - A) + (A % K) >= K) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K;
cin >> K >> A >> B;
if (A % K == 0) {
cout << "OK" << endl;
} else if ((B - A) + (A % K) >= K) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 83 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
if (K > B) {
cout << "NG" << endl;
}
if (A % K == 0 or B % K == 0 or (B - (B % K) >= A)) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
if (K > B) {
cout << "NG" << endl;
} else if (A % K == 0 || B % K == 0 || (B - (B % K) >= A)) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 354], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 106], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 96 |
#include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (K = 1)
cout << "OK" << endl;
else {
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK" << endl;
break;
}
if (i == B)
cout << "NG" << endl;
}
}
} | #include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (K == 1)
cout << "OK" << endl;
else {
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK" << endl;
break;
}
if (i == B)
cout << "NG" << endl;
}
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 94 |
def main():
K = int(input())
A, B = map(int, input().split())
for i in range(A, B + 1):
if i % K == 0:
print('OK')
return 0
print('NO')
return 0
if __name__ == '__main__':
main()
| def main():
K = int(input())
A, B = map(int, input().split())
for i in range(A, B + 1):
if i % K == 0:
print('OK')
return 0
print('NG')
return 0
if __name__ == '__main__':
main()
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 74 |
K = int(input())
A,B = list(map(int, input().split()))
ans = "NG"
for i in range(A-B+1):
Temp = A+i
if(Temp%K==0):
ans = "OK"
print(ans)
| K = int(input())
A,B = list(map(int, input().split()))
ans = "NG"
for i in range(B-A+1):
Temp = A+i
if(Temp%K==0):
ans = "OK"
print(ans) | [["-", 12, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["-", 12, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 12, 22]] | 5 | 67 |
k = int(input())
a, b = map(int, input().split())
n = b-a
c = 0
for i in range(n):
if (a+i)%k==0 :
c = 1
print("OK")
break
if c == 0:
print("NG") | k = int(input())
a, b = map(int, input().split())
n = b-a
c = 0
for i in range(n+1):
if (a+i)%k==0 :
c = 1
print("OK")
break
if c == 0:
print("NG") | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 72 |
function Main(S) {
const K = parseInt(S.split("\n")[0]);
const A = parseInt(S.split("\n")[1].split(" ")[0]);
const B = parseInt(S.split("\n")[1].split(" ")[1]);
let ans = '';
for (let i = A; i <= B; i++) {
if (B % i === 0) {
ans = 'OK'
}
}
console.log(ans === '' ? 'NG' : 'OK');
}
Main(req... |
function Main(S) {
const K = parseInt(S.split("\n")[0]);
const A = parseInt(S.split("\n")[1].split(" ")[0]);
const B = parseInt(S.split("\n")[1].split(" ")[1]);
let ans = '';
for (let i = A; i <= B; i++) {
if (i % K === 0) {
ans = 'OK'
}
}
console.log(ans === '' ? 'NG' : 'OK');
}
Main(req... | [["-", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22]] | 2 | 157 |
k = gets.split.map(&:to_i)
a,b=gets.split.map(&:to_i)
y = (b/k[0]).to_i
i = 1
for i in 1..y
if (a <= k[0]*i) && (k[0]*i <= b)
puts 'OK'
break
end
if i == y
puts 'NG'
break
end
end | k = gets.split.map(&:to_i)
a,b=gets.split.map(&:to_i)
y = (b/k[0]).to_i+1
i = 1
for i in 1..y
if (a <= k[0]*i) && (k[0]*i <= b)
puts 'OK'
break
end
if i == y
puts 'NG'
break
end
end | [["+", 36, 36, 0, 493, 0, 662, 12, 738, 17, 72], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 12, 612]] | 4 | 84 |
"use strict";
const main =
arg => {
const inputList = arg.trim().split("\n");
// 回答を記述
const K = parseInt(inputList[0]);
const A = parseInt(inputList[1].split(" ")[0])
const B = parseInt(inputList[1].split(" ")[1])
if (A % K == 0) {
console.log("OK");
}
else ... | "use strict";
const main =
arg => {
const inputList = arg.trim().split("\n");
// 回答を記述
const K = parseInt(inputList[0]);
const A = parseInt(inputList[1].split(" ")[0])
const B = parseInt(inputList[1].split(" ")[1])
if (A % K == 0) {
console.log("OK");
}
else ... | [["+", 0, 11, 12, 16, 31, 2, 63, 558, 500, 22], ["+", 0, 11, 12, 16, 31, 2, 63, 558, 0, 131], ["+", 0, 11, 12, 16, 31, 2, 63, 558, 559, 560]] | 2 | 168 |
#include <stdio.h>
int main() {
int k, A, B;
scanf("%d", &k);
scanf("%d%d", &A, &B);
int i, j = 1;
for (i = A; i <= B; i++) {
j = i % k;
if (j == 0)
break;
}
if (j == 0)
printf("Ok\n");
else
printf("NG\n");
return 0;
} | #include <stdio.h>
int main() {
int k, A, B;
scanf("%d", &k);
scanf("%d%d", &A, &B);
int i, j;
for (i = A; i <= B; i++) {
j = i % k;
if (j == 0)
break;
}
if (j == 0)
printf("OK\n");
else
printf("NG\n");
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K;
cin >> K >> A >> B;
if (A == K)
cout << "OK" << endl;
else if (A == B && A % K == 0)
cout << "OK" << endl;
else if (A == B && A % K != 0)
cout << "NG" << endl;
else if (B / K - A / K >= 1)
cout << "OK" << endl;
else
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K;
cin >> K >> A >> B;
if (A % K == 0)
cout << "OK" << endl;
else if (A == B && A % K == 0)
cout << "OK" << endl;
else if (A == B && A % K != 0)
cout << "NG" << endl;
else if (B / K - A / K >= 1)
cout << "OK" << endl;
el... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 113 |
k=int(input())
a,b=map(int, input().split())
max = int(b/k)
for i in range(1,max+1):
tmp = k * i
if a <= tmp and b >= tmp:
print('Yes')
exit()
print('No') | k=int(input())
a,b=map(int, input().split())
max = int(b/k)
for i in range(1,max+1):
tmp = k * i
if a <= tmp and b >= tmp:
print('OK')
exit()
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 73 |
#include <iostream>
using namespace std;
int main() {
int a, b, k;
cin >> k;
cin >> a;
cin >> b;
int ans = 0;
for (int i = a; i < b; i++) {
if (i % k == 0) {
ans++;
}
}
if (ans == 0) {
cout << "NG";
} else {
cout << "OK";
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, k;
cin >> k;
cin >> a;
cin >> b;
int ans = 0;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
ans++;
}
}
if (ans == 0) {
cout << "NG";
} else {
cout << "OK";
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 91 |
/* Author : Prasuk Jain */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define ull unsigned long long
#define ld long double
#define fo(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = a; i < b; i++)
#de... | /* Author : Prasuk Jain */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define ull unsigned long long
#define ld long double
#define fo(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = a; i < b; i++)
#de... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 540 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B, C;
cin >> K >> A >> B;
C = K;
while (1) {
if (A < K && K < B) {
cout << "OK" << endl;
break;
}
if (B < K) {
cout << "NG" << endl;
break;
}
K += C;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B, C;
cin >> K >> A >> B;
C = K;
while (1) {
if (A <= K && K <= B) {
cout << "OK" << endl;
break;
}
if (B < K) {
cout << "NG" << endl;
break;
}
K += C;
}
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K, y;
cin >> A >> B >> K;
y = A / K;
if (K * (y + 1) <= B || K * y == A) {
cout << "OK" << endl;
} else
cout << "NG" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, K, y;
cin >> K >> A >> B;
y = A / K;
if (K * (y + 1) <= B || K * y == A) {
cout << "OK" << endl;
} else
cout << "NG" << endl;
} | [["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 72 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int k, a, b;
cin >> k;
cin >> a >> b;
for (int i = a; i <= b; ++i) {
if (i % k == 0) {
cout << "OK"
<< "\n";
return 0;
}
}
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int k, a, b;
cin >> k;
cin >> a >> b;
for (int i = a; i <= b; ++i) {
if (i % k == 0) {
cout << "OK"
<< "\n";
return 0;
}
}
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 105 |
K=int(input())
A,B=list(map(int,input().split()))
x=0
for i in range(A,B):
if i%K==0:
x=x+1
if x>0 or K==1:
print('OK')
else:
print('NG') | K=int(input())
A,B=list(map(int,input().split()))
x=0
for i in range(A,B+1):
if i%K==0:
x=x+1
if x>0 or K==1:
print('OK')
else:
print('NG') | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 75 |
K = input("")
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
if number % K == 0:
number = True
print("OK" if number else "NG") | K = int(input(""))
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
if i % K == 0:
number = True
print("OK" if number else "NG") | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 60 |
K=int(input())
flag=0
A,B= map(int,input().split())
for i in range(B-A):
if (A+i)%K==0:
flag=1
break
if flag==1:
print('OK')
elif K==1:
print('OK')
else:
print('NG') | K=int(input())
flag=0
A,B= map(int,input().split())
for i in range(B-A+1):
if (A+i)%K==0:
flag=1
break
if flag==1:
print('OK')
elif K==1:
print('OK')
else:
print('NG') | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 82 |
#include <stdio.h>
int main(void) {
int k, a, b;
int ct = 0;
int i;
scanf("%d", &k);
scanf("%d %d", &a, &b);
i = k;
while (k <= b) {
if (a <= k && b <= k) {
ct++;
}
k = k + i;
}
if (ct > 0) {
printf("OK");
} else {
printf("NG");
}
} | #include <stdio.h>
int main(void) {
int k, a, b;
int ct = 0;
int i;
scanf("%d", &k);
scanf("%d %d", &a, &b);
i = k;
while (k <= b) {
if (a <= k && k <= b) {
ct++;
}
k = k + i;
}
if (ct > 0) {
printf("OK");
} else {
printf("NG");
}
} | [["-", 0, 57, 15, 23, 0, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 12, 22]] | 0 | 105 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B, C;
cin >> K >> A >> B;
C = 0;
for (int i = 1; i < B; i++) {
if ((A <= K * i) && (B >= K * i)) {
C = C + 1;
}
}
if (C > 0) {
cout << "OK";
} else {
cout << "NG";
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B, C;
cin >> K >> A >> B;
C = 0;
for (int i = 1; i < B / K + 1; i++) {
if ((A <= K * i) && (B >= K * i)) {
C = C + 1;
}
}
if (C > 0) {
cout << "OK";
} else {
cout << "NG";
}
} | [["+", 0, 7, 15, 16, 12, 16, 31, 16, 17, 85], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll K, A, B;
cin >> K >> A >> B;
ll dis = B - A;
ll st = A % K;
if (K == 1)
cout << "OK" << endl;
else if ((st + dis) >= K)
cout << "OK" << endl;
else
cout << "NG" << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll K, A, B;
cin >> K >> A >> B;
ll dis = B - A;
ll st = A % K;
if (K == 1 || st == 0)
cout << "OK" << endl;
else if ((st + dis) >= K)
cout << "OK" << endl;
else
cout << "NG" << endl;
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 89 |
K = int(input())
A, B = map(int, input().split())
c = False
for i in range(A, B+1):
if i % K == 0:
c = True
print('OK' if c else 'No') | K = int(input())
A, B = map(int, input().split())
c = False
for i in range(A, B+1):
if i%K==0:
c = True
print('OK' if c else 'NG') | [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
bool OK = false;
for (int i = a; a <= b; a++) {
if (i % k == 0) {
OK = true;
}
}
if (OK) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
bool OK = false;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
OK = true;
}
}
if (OK == true) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 146]] | 1 | 87 |
k = int(input())
i,j = input().split()
flag = 0
#print(k,i,j)
for kk in range(int(i),int(j)):
if kk%k==0:
flag=1
print("OK" if flag==1 else "NG") | k = int(input())
i,j = input().split()
flag = 0
#print(k,i,j)
for kk in range(int(i),int(j)+1):
if kk%k==0:
flag=1
print("OK" if flag==1 else "NG")
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 63 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int syou = b / k;
if (b % k == 0) {
System.out.println("OK");
} else {
if ((syou + 1) * k > a) {
... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int syou = a / k;
if (a % k == 0) {
System.out.println("OK");
} else {
if ((syou + 1) * k > b) {
... | [["-", 8, 196, 0, 503, 49, 200, 51, 16, 31, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 31, 22], ["-", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["-", 75, 196, 0, 57, 15, 15, 0, 16, 12, 22], ["+", 75, 196, 0, 57, 15, 15, 0, 16, 12, 22]] | 3 | 131 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (k == 1) {
cout << "OK";
return 0;
} else if (a > k) {
int h = a % k;
if (h != 0) {
if ((a + k - h) <= b) {
cout << "OK";
return 0;
} else {
cout << "NG";
re... | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (k == 1) {
cout << "OK";
return 0;
} else if (a > k) {
int h = a % k;
if (h != 0) {
if ((a + k - h) <= b) {
cout << "OK";
return 0;
} else {
cout << "NG";
re... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 149 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
int A_B = B - A;
if (A_B >= K - 1) {
cout << "OK" << endl;
} else {
int A_divided = A % K;
int B_divided = B % K;
if (A_divided == 0 || B_divided == 0) {
cout << "OK" << endl;
} else if (A_di... | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
int A_B = B - A;
if (A_B >= K - 1) {
cout << "OK" << endl;
} else {
int A_divided = A % K;
int B_divided = B % K;
if (A_divided == 0 || B_divided == 0) {
cout << "OK" << endl;
} else if (A_di... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 117 |
#include <stdio.h>
int main(void) {
int i;
int K, A, B;
A = 0;
B = 0;
K = 0;
scanf("%d", &K);
scanf("%d", &A);
scanf("%d", &B);
for (i = A; i <= B + 1; i++) {
if (i % K == 0) {
printf("OK");
break;
}
if (i = B) {
printf("NG");
break;
}
}
return 0;
} | #include <stdio.h>
int main() {
int i;
int K, A, B;
A = 0;
B = 0;
K = 0;
scanf("%d", &K);
scanf("%d", &A);
scanf("%d", &B);
for (i = A; i <= B + 1; i++) {
if (i % K == 0) {
printf("OK");
break;
}
if (i == B) {
printf("NG");
break;
}
}
return 0;
} | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]] | 0 | 117 |
k = int(input())
ans = 'OK'
a, b = map(int, input().split())
if b-a+1 >= k:
ans = 'OK'
else:
for i in range(a, b+1):
if i%k == 0:
ans = 'OK'
else:
ans = 'NG'
print(ans) | k = int(input())
ans = 'OK'
a, b = map(int, input().split())
if b-a+1 >= k:
ans = 'OK'
else:
for i in range(a, b+1):
if i%k == 0:
ans = 'OK'
break
else:
ans = 'NG'
print(ans) | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k;
cin >> a >> b;
bool bo = false;
for (int i = a / k; i <= b / k; i++) {
if (i % k == 0) {
bo = true;
break;
}
}
if (bo == true) {
cout << "OK";
} else {
cout << "NG";
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k;
cin >> a >> b;
bool bo = false;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
bo = true;
break;
}
}
if (bo == true) {
cout << "OK";
} else {
cout << "NG";
}
} | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 85], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 85], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22]] | 1 | 93 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main() {
int n, a, b;
bool hantei = false;
cin >> n >> a >> b;
int cnt = 0;
rep(i, 1000) {
if (cnt >= a && cnt <= b)
hantei = true;
cnt += n;
}
if (hantei)
cout <<... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main() {
int n, a, b;
bool hantei = false;
cin >> n >> a >> b;
int cnt = 0;
rep(i, 1000) {
if (cnt >= a && cnt <= b)
hantei = true;
cnt += n;
}
if (hantei)
cout <<... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 96 |
#include <stdio.h>
int main() {
int k, a, b;
scanf("%i %i %i", &k, &a, &b);
if (!(a % k) || !(b % k)) {
puts("OK");
return 0;
}
int di = k / a;
di = k * (++di);
if (di >= a && di <= b)
puts("OK");
else
puts("NG");
return 0;
} | #include <stdio.h>
int main() {
int k, a, b;
scanf("%i %i %i", &k, &a, &b);
if (!(a % k) || !(b % k)) {
puts("OK");
return 0;
}
int di = a / k;
di = k * (++di);
if (di >= a && di <= b)
puts("OK");
else
puts("NG");
return 0;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 0 | 103 |
#include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
bool a = true;
for (int i = 0; i <= B - A; i++) {
if ((B + i) % K == 0) {
cout << "OK" << endl;
a = false;
break;
}
}
if (a) {
cout << "NG" << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
bool a = true;
for (int i = 0; i <= B - A; i++) {
if ((A + i) % K == 0) {
cout << "OK" << endl;
a = false;
break;
}
}
if (a) {
cout << "NG" << endl;
}
} | [["-", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22]] | 1 | 92 |
k = int(input())
a, b = map(int, input().split())
a_div_k = a // k
b_div_k = b // k
a_mod_k = a % k
b_mod_k = b % k
if b < k:
print("NG")
elif k == 1:
print("OK")
elif k == b:
print("OK")
elif (a_mod_k == 0) and (b_mod_k == 0) and (a_div_k == b_div_k):
print("OK")
elif (k < a) and (a_div_k == b_div_k... | k = int(input())
a, b = map(int, input().split())
a_div_k = a // k
b_div_k = b // k
a_mod_k = a % k
b_mod_k = b % k
if b < k:
print("NG")
elif k == 1:
print("OK")
elif k == b:
print("OK")
elif (a_mod_k == 0) or (b_mod_k == 0) and (a_div_k == b_div_k):
print("OK")
elif (k < a) and (a_div_k == b_div_k)... | [["-", 0, 57, 75, 665, 15, 679, 31, 679, 17, 355], ["+", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354]] | 5 | 129 |
def main():
k = int(input())
a, b = map(int, input().split())
m = []
for i in range(a, b):
if i%k == 0:
m.append(i)
break
if len(m)>0:
print('OK')
else:
print('NG')
main() | def main():
k = int(input())
a, b = map(int, input().split())
m = []
for i in range(a, b+1):
if i%k == 0:
m.append(i)
break
if len(m)>0:
print('OK')
else:
print('NG')
main() | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 82 |
N = int(input())
A = list(map(int, input().split())) # 入力のときに N を使う必要はありません
icount = 0
if A[1] - A[0] >= N:
print('OK')
icount = icount + 1
else:
for i in range(A[0], A[1]+1):
if i % A[0] == 0:
print('OK')
icount = icount + 1
if icount == 1:
break
if icount == 0:
print('NG'... | N = int(input())
A = list(map(int, input().split())) # 入力のときに N を使う必要はありません
icount = 0
if A[1] - A[0] >= N:
print('OK')
icount = icount + 1
else:
for i in range(A[0], A[1]+1):
if i % N == 0:
print('OK')
icount = icount + 1
if icount == 1:
break
if icount == 0:
print('NG')
| [["-", 0, 57, 15, 666, 0, 657, 12, 206, 51, 22], ["-", 0, 57, 15, 666, 0, 657, 12, 206, 0, 70], ["-", 0, 57, 15, 666, 0, 657, 12, 206, 206, 612], ["-", 0, 57, 15, 666, 0, 657, 12, 206, 0, 73], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 111 |
K = int(input())
A,B = map(int,input().split())
l = []
for i in range(A,B+1):
if i % 7 == 0:
l.append(i)
#print(l)
if not l:
print("NG")
else:
print("OK") | K = int(input())
A,B = map(int,input().split())
l = []
for i in range(A,B+1):
if i % K == 0:
l.append(i)
#print(l)
if not l:
print("NG")
else:
print("OK") | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 72 |
K = int(input())
A, B = map(int, input().split())
print('OK' if (B-A >= K-A%K) else 'NG')
| K = int(input())
A, B = map(int, input().split())
print('OK' if (B-A >= (K-A%K)%K) else 'NG') | [["+", 0, 23, 0, 666, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 109], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 22], ["+", 0, 23, 0, 666, 0, 657, 31, 23, 0, 25]] | 5 | 46 |
k = int(input())
a,b = (map(int,input().split()))
new_list = []
for i in range(a,b+1):
if i%k == 0:
print('Yes')
break
else:
print('NG')
break |
k = int(input())
a,b = (map(int,input().split()))
new_list = []
for i in range(a,b+1):
if i%k == 0:
print("OK")
break
else:
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["-", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94]] | 5 | 65 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, x;
string ans = "No";
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
x = i % k;
if (x == 0) {
ans = "Yes";
break;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, x;
string ans = "NG";
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
x = i % k;
if (x == 0) {
ans = "OK";
break;
}
}
cout << ans << endl;
} | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]] | 1 | 80 |
K = int(input())
a, b = list(map(int, input().split()))
count = 0
for i in range(a,b+1):
if i % K == 0:
count += 1
if count >= 1:
print('OK')
else:
print('NO') | K = int(input())
a, b = list(map(int, input().split()))
count = 0
for i in range(a,b+1):
if i % K == 0:
count += 1
if count >= 1:
print('OK')
else:
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
long long int k, x, y, ans = 0;
cin >> k;
cin >> x >> y;
if (x % k == 0) {
cout << "OK";
} else {
ans = x / k + 1;
if ((ans * 7) <= y) {
cout << "OK";
} else {
cout << "NG";
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
long long k, x, y, ans = 0;
cin >> k >> x >> y;
if (x % k == 0) {
cout << "OK";
} else {
ans = x / k + 1;
if ((ans * k) <= y) {
cout << "OK";
} else {
cout << "NG";
}
}
}
| [["-", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 90 |
import java.util.*;
class Main {
public static void main(String argsp[]) {
Scanner s = new Scanner(System.in);
int k = s.nextInt();
int a = s.nextInt();
int b = s.nextInt();
for (int i = a; i <= b; i++) {
if (a % k == 0) {
System.out.println("OK");
return;
}
}
S... | import java.util.*;
class Main {
public static void main(String argsp[]) {
Scanner s = new Scanner(System.in);
int k = s.nextInt();
int a = s.nextInt();
int b = s.nextInt();
for (int i = a; i <= b; i++) {
if (i % k == 0) {
System.out.println("OK");
return;
}
}
S... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22]] | 3 | 111 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
int a = A % K;
if (a == 0) {
cout << "OK" << endl;
} else {
a += B;
a++;
a -= A;
if (a >= K) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
int a = A % K;
if (a == 0) {
cout << "OK" << endl;
} else {
a += B;
a -= A;
if (a >= K) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
}
| [["-", 75, 76, 0, 9, 0, 1, 0, 27, 17, 29], ["-", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22]] | 1 | 91 |
K = int(input())
A, B = map(int, input().split())
check = 0
for i in range(A, B+1):
if i % K == 0:
print("OK")
check = 1
if check == 0:
print("NG")
| K = int(input())
A, B = map(int, input().split())
check = 0
for i in range(A, B+1):
if i % K == 0:
print("OK")
check = 1
break
if check == 0:
print("NG")
| [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 66 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int a, b, i, k, ans, flag = 0;
scanf("%d\n", &k);
scanf("%d %d", &a, &b);
for (i = 0; i < b - a; i++) {
ans = a + i;
if (ans % k == 0)
flag++;
}
if (flag == 0)
printf("NG");
else
printf("OK"... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int a, b, i, k, ans, flag = 0;
scanf("%d\n", &k);
scanf("%d %d", &a, &b);
for (i = 0; i <= b - a; i++) {
ans = a + i;
if (ans % k == 0)
flag++;
}
if (flag == 0)
printf("NG");
else
printf("OK... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 112 |
K = input()
A,B = input().split()
k = int(K)
a = int(A)
b = int(B)
x = a // k
z = b // k
for i in range(z-x + 1):
if a <= k*(x+i) and k*i <= b:
print("OK")
exit()
print("NO") | K = input()
A,B = input().split()
k = int(K)
a = int(A)
b = int(B)
x = a // k
z = b // k
# print(x,z)
for i in range(z-x + 1):
# print("fof---", k*(x+i))
if a <= k*(x+i) and k*(x+i) <= b:
print("OK")
exit()
print("NG") | [["+", 15, 679, 12, 666, 0, 657, 12, 23, 0, 24], ["+", 12, 666, 0, 657, 12, 23, 0, 657, 31, 22], ["+", 12, 666, 0, 657, 12, 23, 0, 657, 17, 72], ["+", 15, 679, 12, 666, 0, 657, 12, 23, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 88 |
K = int(input())
A, B = input().split()
A = int(A)
B = int(B)
ans = "NG"
for i in range(B):
if A <= K * i and K * i <= B:
ans = "OK"
break
print(ans) | K = int(input())
A, B = input().split()
A = int(A)
B = int(B)
ans = "NG"
for i in range(B+1):
if A <= K * i and K * i <= B:
ans = "OK"
break
print(ans)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 67 |
K=int(input())
A,B=map(int,input().split())
a=A//K
b=B//K
def f(x):
return x//1
if f(b)-f(a)>=1:
print("OK")
elif A//K==0:
print("OK")
else:
print("NG")
| K=int(input())
A,B=map(int,input().split())
a=A//K
b=B//K
def f(x):
return x//1
if f(b)-f(a)>=1:
print("OK")
elif A%K==0:
print("OK")
else:
print("NG")
| [["-", 0, 57, 75, 665, 15, 666, 0, 657, 17, 676], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 17, 109]] | 5 | 84 |
#include <iostream>
using namespace std;
int main() {
int a, b, k;
cin >> k >> a >> b;
int n = (a % k) ? ((a / k) + 1) * k : (a / k) * k;
n < b ? cout << "OK" : cout << "NG";
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, k;
cin >> k >> a >> b;
int n = (a % k) ? ((a / k) + 1) * k : (a / k) * k;
n <= b ? cout << "OK" : cout << "NG";
return 0;
} | [["-", 8, 9, 0, 1, 0, 41, 15, 16, 17, 18], ["+", 8, 9, 0, 1, 0, 41, 15, 16, 17, 19]] | 1 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int A = 0;
int B = 0;
int K = 0;
cin >> K;
cin >> A;
cin >> B;
bool ans = false;
for (int i = 0; i < B - A + 1; i++) {
if ((A + i) % K == 0) {
ans = true;
}
}
if (ans) {
cout << "OK" << endl;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int A = 0;
int B = 0;
int K = 0;
cin >> K;
cin >> A;
cin >> B;
bool ans = false;
for (int i = 0; i < B - A + 1; i++) {
if ((A + i) % K == 0) {
ans = true;
}
}
if (ans) {
cout << "OK" << endl;
}... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 108 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <tgmath.h>
#include <unordered_ma... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <tgmath.h>
#include <unordered_ma... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 1,654 |
K = int(input())
A, B = tuple(map(int, input().split()))
a = A%K
if a==0 and K-a+A<=B:
print("OK")
else:
print("NG")
| K = int(input())
A, B = tuple(map(int, input().split()))
a = A%K
if a==0 or K-a+A<=B:
print("OK")
else:
print("NG") | [["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354]] | 5 | 59 |
#include <iostream>
#include <map>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
// #define rep(i, n) for (ll i = 1; i < (n+1); i++)
// #define rep(j, n) for (ll j = 1; j < (n+1); j++)
// #define rep(k, n) for (ll k = 1; k < (n+1); k++)
// int main()
... | #include <iostream>
#include <map>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define ll long long
// #define rep(i, n) for (ll i = 1; i < (n+1); i++)
// #define rep(j, n) for (ll j = 1; j < (n+1); j++)
// #define rep(k, n) for (ll k = 1; k < (n+1); k++)
// int main()
... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 138 |
n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
if am%7==0:
kl.append(am)
if len(kl)>0:
print("OK")
else:
print("NG")
| n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
if am%n==0:
kl.append(am)
if len(kl)>0:
print("OK")
else:
print("NG") | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 84 |
n = int(input())
a,b=list(map(int, input().split()))
p = ((a-1)//n+1)*n
if(p<=b):
print('Yes')
else:
print('No') |
n = int(input())
a,b=list(map(int, input().split()))
p = ((a-1)//n+1)*n
if(p<=b):
print('OK')
else:
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
for (int i = 1; i < 1000; i++) {
if (i * a >= b && i * a <= c) {
cout << "OK";
break;
}
}
cout << "NG";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
for (int i = 1; i < 1000; i++) {
if (i * a >= b && i * a <= c) {
cout << "OK";
return 0;
}
}
cout << "NG";
} | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 73 |
K = int(input())
A, B = map(int, input().split())
r = A // K
d = A % K
if d == 0 or K * r + d + K <= B or B % K == 0 :
print('OK')
else:
print('NG')
| K = int(input())
A, B = map(int, input().split())
r = A // K
d = A % K
if d == 0 or K * r + K <= B or B % K == 0 :
print('OK')
else:
print('NG')
| [["-", 31, 679, 12, 666, 0, 657, 31, 657, 12, 22], ["-", 15, 679, 31, 679, 12, 666, 0, 657, 17, 72]] | 5 | 69 |
k = int(input())
a, b = map(int, input().split())
checker = False
if a!=b:
for i in range(a+1,b+1):
if i%k == 0:
checker = True
break
else:
if a%k == 0:
checker = True
print("OK" if checker else "NG") | k = int(input())
a, b = map(int, input().split())
checker = False
if a!=b:
for i in range(a,b+1):
if i%k == 0:
checker = True
break
else:
if a%k == 0:
checker = True
print("OK" if checker else "NG") | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 81 |
const Main =
input => {
const inp = input.split("\n"); //["K", "A B"]
const ab = inp[1].split(" "); //["A", "B"]
const k = parseInt(inp[0], 10);
const a = parseInt(ab[0], 10);
const b = parseInt(ab[1], 10);
let result = "NG";
const min = Math.ceil(a / k);
if (a <= m... | const Main =
input => {
const inp = input.split("\n"); //["K", "A B"]
const ab = inp[1].split(" "); //["A", "B"]
const k = parseInt(inp[0], 10);
const a = parseInt(ab[0], 10);
const b = parseInt(ab[1], 10);
let result = "NG";
const min = Math.ceil(a / k);
if (a <= k... | [["+", 15, 23, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 15, 23, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 23, 0, 16, 12, 16, 31, 16, 17, 48]] | 2 | 138 |
n,a,b=map(int,open(0).read().split())
for i in range(a,b+1):
if i%n==0:
print('OK')
exit()
print('NO') | n,a,b=map(int,open(0).read().split())
for i in range(a,b+1):
if i%n==0:
print('OK')
exit()
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 57 |
import java.util.Scanner;
public class Main {
static int K;
static int A;
static int B;
static int a;
static int b;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
K = sc.nextInt();
A = sc.nextInt();
B = sc.nextInt();
a = A / K;
b = B / K;
if (a != ... | import java.util.Scanner;
public class Main {
static int K;
static int A;
static int B;
static int a;
static int b;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
K = sc.nextInt();
A = sc.nextInt();
B = sc.nextInt();
a = A / K;
b = B / K;
if (a != ... | [["-", 15, 15, 0, 16, 12, 16, 31, 16, 17, 85], ["+", 15, 15, 0, 16, 12, 16, 31, 16, 17, 109]] | 3 | 176 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
int main() {
int k, a, b;
cin >> k >> a >> b;
if (k == 1) {
cout << "OK";
} else if (a % k == 0 || b % k == 0) {
cout << "OK";
} else if (k * a / k + k >= a && k * a / k + k <= b) {
cout << "OK";
} else {
c... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
int main() {
int k, a, b;
cin >> k >> a >> b;
if (k == 1) {
cout << "OK";
} else if (a % k == 0 || b % k == 0) {
cout << "OK";
} else if (k * (a / k) + k >= a && k * (a / k) + k <= b) {
cout << "OK";
} else {
... | [["+", 31, 16, 31, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 16, 12, 23, 0, 25], ["+", 12, 16, 31, 16, 31, 16, 12, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 16, 12, 23, 0, 25]] | 1 | 110 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
typedef std::pair<int, int> ipair;
bool lessPair(const ipair &l, const ipair &r) { return l.second < r.second; }
bool greater... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
typedef std::pair<int, int> ipair;
bool lessPair(const ipair &l, const ipair &r) { return l.second < r.second; }
bool greater... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 634 |
n=int(input())
a,b=map(int,input().split())
k=0
for i in range(a,b+1):
if(n%i==0):
k=1
break
else:
k=0
if(k==1):print("OK")
else:print("NG") | n=int(input())
a,b=map(int,input().split())
k=0
for i in range(a,b+1):
if(i%n==0):
k=1
break
else:
k=0
if(k==1):print("OK")
else:print("NG") | [["-", 0, 57, 15, 23, 0, 666, 0, 657, 31, 22], ["-", 0, 57, 15, 23, 0, 666, 0, 657, 17, 109], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 109], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 12, 22]] | 5 | 78 |
import numpy as np
s= int(input())
List = list(map(int, input().split()))
array = list()
for i in range(List[0],List[1]):
if s == 1:
array.append("OK")
break
if i % s == 0:
array.append("OK")
break
if ('OK' in array):
print("OK")
else:
print("NG") | import numpy as np
s= int(input())
List = list(map(int, input().split()))
array = list()
for i in range(List[0],List[1]+1):
if s == 1:
array.append("OK")
break
if i % s == 0:
array.append("OK")
break
if ('OK' in array):
print("OK")
else:
print("NG") | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 103 |
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using pii = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
int main() {
int A, B, K;
cin >> K >> A >> B;
cout << ((B / K - A / K) > 0 ? "OK" : "NG");
} | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using pii = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
int main() {
int A, B, K;
cin >> K >> A >> B;
cout << ((B / K - (A - 1) / K) > 0 ? "OK" : "NG");
} | [["+", 31, 23, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 87 |
#include <stdio.h>
int main() {
int k, a, b, i, max, j, flag = 0;
scanf("%d", &k);
scanf("%d", &a, &b);
for (i = a; i <= b; i++)
if (i % k == 0)
flag = 1;
if (flag == 1) {
printf("OK");
} else
printf("NG");
} | #include <stdio.h>
int main() {
int k, a, b, i, max, j, flag = 0;
scanf("%d", &k);
scanf("%d %d", &a, &b);
for (i = a; i <= b; i++)
if (i % k == 0)
flag = 1;
if (flag == 1) {
printf("OK");
} else
printf("NG");
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 96 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, sum;
cin >> k >> a >> b;
for (int i = 0; i < b; i++) {
sum = i * k;
if (sum >= a && sum <= b) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, sum;
cin >> k >> a >> b;
for (int i = 0; i < b + 1; i++) {
sum = i * k;
if (sum >= a && sum <= b) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
}
| [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 82 |
k = input()
a, b = input().split()
for cnt in range(int(b)):
if cnt+1 >= int(a):
if cnt+1 % int(k) == 0 or int(k) == 1:
print("OK")
exit()
print("NO")
| k = input()
a, b = input().split()
for cnt in range(int(b)):
if cnt+1 >= int(a):
# print(cnt+1,int(k),int(cnt+1) % int(k))
if int(cnt+1)% int(k) == 0 or int(k) == 1:
print("OK")
exit()
print("NG") | [["+", 15, 679, 31, 666, 0, 657, 31, 652, 63, 22], ["+", 31, 666, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 31, 666, 0, 657, 31, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
int A;
int B;
cin >> A >> B;
for (int i = A; i < B; i++) {
if (i % K == 0) {
cout << "OK";
return 0;
}
}
cout << "NG";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
int A;
int B;
cin >> A >> B;
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK";
return 0;
}
}
cout << "NG";
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 72 |
import numpy as np
a = int(input())
b,c=map(int,input().split())
d = np.arange(7, 995, 7)
f = np.arange(b,c+1)
d_set=set(d)
f_set=set(f)
#dとfに共通するものを抽出
g_set=d_set&f_set
#結果をlistに変換
g=list(g_set)
if len(g) == 0:
print('NG')
else:
print('OK') | import numpy as np
a = int(input())
b,c=map(int,input().split())
d = np.arange(a,1001,a)
f = np.arange(b,c+1)
d_set=set(d)
f_set=set(f)
#dとfに共通するものを抽出
g_set=d_set&f_set
#結果をlistに変換
g=list(g_set)
if len(g) == 0:
print('NG')
else:
print('OK') | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612]] | 5 | 99 |
k = int(input())
a,b = map(int, input().split())
ans = "NG"
if k == 1:
ans = "OK"
elif k >1000:
ans = "NG"
else:
for i in range(a, b):
if (i) % k == 0:
ans = "OK"
break
print(ans)
| k = int(input())
a,b = map(int, input().split())
ans = "NG"
if k == 1:
ans = "OK"
elif k >1000:
ans = "NG"
else:
for i in range(a, b+1):
if i % k == 0:
ans = "OK"
break
print(ans)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["-", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]] | 5 | 80 |
K = int(input())
A,B = map(int,input().split())
for Num in range(A,B+1):
count =0
if Num%K ==0:
count+=1
if count!=0:
print("OK")
else:
print("NG")
| K = int(input())
A,B = map(int,input().split())
count =0
for Num in range(A,B+1):
if Num%K ==0:
count+=1
if count !=0:
print("OK")
else:
print("NG")
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 68 |
#include <bits/stdc++.h>
using namespace std;
// using Graph = vector<vector<int>>;
using P = pair<int, pair<int, int>>;
// int dy[4] = {-1,0,1,0};
// int dx[4] = {0,-1,0,1};
int main() {
int K, A, B;
cin >> K >> A >> B;
int a = A / K;
int b = B / K;
if (a % K == 0 || a != b)
cout << "OK" << endl;
els... | #include <bits/stdc++.h>
using namespace std;
// using Graph = vector<vector<int>>;
using P = pair<int, pair<int, int>>;
// int dy[4] = {-1,0,1,0};
// int dx[4] = {0,-1,0,1};
int main() {
int K, A, B;
cin >> K >> A >> B;
int a = A / K;
int b = B / K;
if (A % K == 0 || a != b)
cout << "OK" << endl;
els... | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22]] | 1 | 96 |
K = int(input())
A, B = [int(n) for n in input().split()]
ans = 'NO'
for i in range(A, B+1):
if i%K == 0:
ans = 'OK'
break
print(ans)
| K = int(input())
A, B = [int(n) for n in input().split()]
ans = 'NG'
for i in range(A, B+1):
if i%K == 0:
ans = 'OK'
break
print(ans)
| [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 62 |
k = int(input())
a, b = map(int, input().split())
def ok_ng():
for i in range(a, b):
if i % k == 0:
return "OK"
else:
return "NG"
print(ok_ng())
| k = int(input())
a, b = map(int, input().split())
def ok_ng():
for i in range(a, b+1):
if i % k == 0:
return "OK"
else:
return "NG"
print(ok_ng())
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 62 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, c;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
c = i;
}
}
if (c % k == 0) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b, c;
cin >> k >> a >> b;
c = a;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
c = i;
}
}
if (c % k == 0) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 88 |
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b, k;
scanf("%d", &k);
scanf("%d %d", &a, &b);
int i;
for (i = a; i < b; i++) {
if (i % k == 0) {
printf("OK");
return 0;
}
}
printf("NG");
return 0;
} | #include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b, k;
scanf("%d", &k);
scanf("%d %d", &a, &b);
int i;
for (i = a; i <= b; i++) {
if (i % k == 0) {
printf("OK");
return 0;
}
}
printf("NG");
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
int A, B;
cin >> K;
cin >> A >> B;
for (int i = A; i < B + 1; ++i) {
if (i % K == 0) {
cout << "OK" << endl;
break;
} else if (i == B - 1) {
cout << "NG" << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
int A, B;
cin >> K;
cin >> A >> B;
for (int i = A; i < B + 1; ++i) {
if (i % K == 0) {
cout << "OK" << endl;
break;
} else if (i == B) {
cout << "NG" << endl;
}
}
} | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 87 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n;
cin >> a >> b;
for (int i = b; i <= a; i++) {
if (i % n == 0) {
cout << "OK";
return 0;
}
}
cout << "NG";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b;
cin >> n;
cin >> a >> b;
for (int i = a; i <= b; i++) {
if (i % n == 0) {
cout << "OK";
return 0;
}
}
cout << "NG";
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 73 |
import sys
# input
k = int(input())
a, b = map(int, input().split())
#print(f"k >>{k}, a >>{a}, b >>{b}")
for i in range(a, b):
if (i % k == 0):
print("OK")
sys.exit(0)
print("NG") | import sys
# input
k = int(input())
a, b = map(int, input().split())
#print(f"k >>{k}, a >>{a}, b >>{b}")
for i in range(a, b+1):
if (i % k == 0):
print("OK")
sys.exit(0)
print("NG")
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 65 |
#include <bits/stdc++.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
int K, A, B, x;
int j = 0;
cin >> K >> A >> B;
for (int i = A; i < B + 1; i++) {
x = i % K;
if (x == 0) {
j++;
}
}
if (j < 0) {
cout << "OK" << endl... | #include <bits/stdc++.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
int K, A, B, x;
int j = 0;
cin >> K >> A >> B;
for (int i = A; i < B + 1; i++) {
x = i % K;
if (x == 0) {
j++;
}
}
if (j > 0) {
cout << "OK" << endl... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 107 |
k = int(input())
a, b = map(int, input().split())
for cnt in range(a, b):
if cnt % k == 0:
print('OK')
break
elif cnt + 1 == b:
print('NG') | k = int(input())
a, b = map(int, input().split())
for cnt in range(a, b + 1):
if cnt % k == 0:
print('OK')
break
elif cnt + 1 == b + 1:
print('NG') | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 17, 72], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 12, 612]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (K == 1) {
cout << "OK" << endl;
}
else if (K > B) {
cout << "NG" << endl;
}
else if (A % K == 0 || B % K == 0) {
cout << "Ok" << endl;
}
else if (A == B) {
cout << "NG" << endl;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (K == 1) {
cout << "OK" << endl;
}
else if (K > B) {
cout << "NG" << endl;
}
else if (A % K == 0 || B % K == 0) {
cout << "OK" << endl;
}
else if (A == B) {
cout << "NG" << endl;
}
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 148 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
int n;
if (a < k)
n = k;
int cnt = 0;
while (n <= b) {
if (n % k == 0) {
cnt = 1;
break;
}
n++;
}
if (cnt)
cout << "OK";
else
cout << "NG";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
int n = a;
if (a < k)
n = k;
int cnt = 0;
while (n <= b) {
if (n % k == 0) {
cnt = 1;
break;
}
n++;
}
if (cnt)
cout << "OK";
else
cout << "NG";
}
| [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 89 |
k=int(input())
a,b=map(int,input().split())
d=0
v=0
for i in range(1001):
d=k*i
if d>=a and d<=b:
v+=1
if v>=1:
print("OK")
else:
print("NO") | k=int(input())
a,b=map(int,input().split())
d=0
v=0
for i in range(1001):
d=k*i
if d>=a and d<=b:
v+=1
if v>=1:
print("OK")
else:
print("NG") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 74 |
using namespace std;
#define mod 1000000007
#define pb push_back
#define eb emplace_back
#define mp make_pair
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define ll long long int
bool isprime(int x) {
for (int i = 2; i * i <= x; i++)
if (x %... | using namespace std;
#define mod 1000000007
#define pb push_back
#define eb emplace_back
#define mp make_pair
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define ll long long int
bool isprime(int x) {
for (int i = 2; i * i <= x; i++)
if (x %... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 181 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str1 = scan.nextLine();
String str2 = scan.nextLine();
String str3 = scan.nextLine();
int num1 = Integer.parseInt(str1);
int num2 = Integer.parseInt(str2);
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str1 = scan.nextLine();
String str2 = scan.next();
String str3 = scan.next();
int num1 = Integer.parseInt(str1);
int num2 = Integer.parseInt(str2);
int num... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 180 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define srep(i, s, t) for (int i = s; i < t; i++)
#define drep(i, n) for (int i = (n)-1; i >= 0; i--)
... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define srep(i, s, t) for (int i = s; i < t; i++)
#define drep(i, n) for (int i = (n)-1; i >= 0; i--)
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 137 |
k = readline.to_i
a, b = readline.split(' ').map(&:to_i)
r = 'NG'
(a..b).each do |n|
puts n
if (n % k).zero?
r = 'OK'
break
end
end
puts r
| k = readline.to_i
a, b = readline.split(' ').map(&:to_i)
r = 'NG'
(a..b).each do |n|
if (n % k).zero?
r = 'OK'
break
end
end
puts r
| [["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]] | 4 | 59 |
#include <bits/stdc++.h> // below comment for pbds
#include <ext/pb_ds/assoc_container.hpp> // to use it make ordered_set
#include <ext/pb_ds/tree_policy.hpp> // all set fnct + = 1. order_of_key(x); // number of
#define ll long long // element strictly smaller than it;
#define ld ... | #include <bits/stdc++.h> // below comment for pbds
#include <ext/pb_ds/assoc_container.hpp> // to use it make ordered_set
#include <ext/pb_ds/tree_policy.hpp> // all set fnct + = 1. order_of_key(x); // number of
#define ll long long // element strictly smaller than it;
#define ld ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]] | 1 | 156 |
#include <bits/stdc++.h>
#define NAME "taskA"
#define scan 1
bool isFile;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<p... | #include <bits/stdc++.h>
#define NAME "taskA"
#define scan 1
bool isFile;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<p... | [["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 753 |
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(a) a.size()
#define re return
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
signed main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c / a)
cout << "Ok";
else if (b % a == 0 || c % a == 0)
co... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(a) a.size()
#define re return
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
signed main() {
int a, b, c;
cin >> a >> b >> c;
if (b / a < c / a)
cout << "OK";
else if (b % a == 0 || c % a == 0)
co... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 98 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.