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 |
|---|---|---|---|---|
#include <stdio.h>
int main(void) {
int A, B, K;
int i;
scanf("%d", &K);
scanf("%d %d", &A, &B);
for (i = A; i < B; i++) {
if (i % K == 0) {
printf("OK\n");
return 0;
}
}
printf("NG\n");
return 0;
}
| #include <stdio.h>
int main(void) {
int A, B, K;
int i;
scanf("%d", &K);
scanf("%d %d", &A, &B);
for (i = A; i <= B; i++) {
if (i % K == 0) {
printf("OK\n");
return 0;
}
}
printf("NG\n");
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 <stdio.h>
int main() {
int k, a, b;
scanf("%d", &k);
scanf("%d %d", &a, &b);
int judge = 0;
for (int i = a; i <= b; i++) {
if (i % k == 0)
;
judge = 1;
}
if (judge == 1) {
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 judge = 0;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
judge = 1;
}
}
if (judge == 1) {
printf("OK\n");
} else {
printf("NG\n");
}
return 0;
}
| [["-", 0, 7, 8, 9, 0, 57, 64, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 0 | 102 |
#include <stdio.h>
int main(void) {
int a;
int b;
int k;
scanf("%d %d %d", &k, &a, &b);
int max = (k / b) * b;
if (a <= max) {
printf("OK\n");
} else {
printf("NG\n");
}
return 0;
} | #include <stdio.h>
int main(void) {
int a;
int b;
int k;
scanf("%d %d %d", &k, &a, &b);
int max = (b / k) * k;
if (a <= max) {
printf("OK\n");
} else {
printf("NG\n");
}
return 0;
}
| [["-", 49, 50, 51, 16, 31, 23, 0, 16, 31, 22], ["-", 49, 50, 51, 16, 31, 23, 0, 16, 17, 85], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 85], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 0 | 75 |
K = int(input())
A, B = map(int, input().split())
can_K_times = False
if (A % K) == 0 or (B % K) == 0:
can_K_times = True
elif (A / K) != (B / K):
can_K_times = True
if can_K_times:
print("OK")
else:
print("NG") | K = int(input())
A, B = map(int, input().split())
can_K_times = False
if (A % K) == 0 or (B % K) == 0:
can_K_times = True
elif (A // K) != (B // K):
can_K_times = True
if can_K_times:
print("OK")
else:
print("NG") | [["-", 75, 665, 15, 666, 0, 23, 0, 657, 17, 85], ["+", 75, 665, 15, 666, 0, 23, 0, 657, 17, 676]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll t;
t = 1;
// cin t;
while (t--) {
ll x;
cin >> x;
ll a, b;
cin >> a >> b;
for (int i = a; i <= b; i++) {
if (i % x == 0) {
cout << "OK" << endl;
return 0;
}
}
cout << ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll t;
t = 1;
// cin t;
while (t--) {
ll x;
cin >> x;
ll a, b;
cin >> a >> b;
for (int i = a; i <= b; i++) {
if (i % x == 0) {
cout << "OK" << endl;
return 0;
}
}
cout << ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 93 |
#include <stdio.h>
int main() {
int k, a, b;
scanf("%d%d%d", &k, &a, &b);
for (int i = k; i < b; i += k) {
if (i >= a && i <= b) {
printf("OK");
return 0;
}
}
printf("NG");
}
| #include <stdio.h>
int main() {
int k, a, b;
scanf("%d%d%d", &k, &a, &b);
for (int i = k; i <= b; i += k) {
if (i >= a && i <= b) {
printf("OK");
return 0;
}
}
printf("NG");
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 77 |
k=int(input())
a,b=map(int,input().split())
ans='NO'
for i in range(a,b+1):
if i%k==0:
ans='YES'
print(ans) | k=int(input())
a,b=map(int,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], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 57 |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
public class Main {
public static void main(String[] args) {
new Main().solve();
pw.close();
}
/**
... | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
public class Main {
public static void main(String[] args) {
new Main().solve();
pw.close();
}
/**
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 2,434 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
bool ans = false;
for (int i = 1; i <= 1000; i++) {
if (K * i >= A && K * i <= B)
ans = true;
if (ans == 1) {
cout << "YES" << endl;
break;
}
}
if (ans == 0)
cout << "NO" << endl;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
bool ans = false;
for (int i = 1; i <= 1000; i++) {
if (K * i >= A && K * i <= B)
ans = true;
if (ans == 1) {
cout << "OK" << endl;
break;
}
}
if (ans == 0)
cout << "NG" << endl;
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 98 |
input = readlines()
target = input.shift().chomp.to_i
list = input.shift().chomp.split("\s").map{|x| x.to_i}
found = false
(list[0]..list[1]).each do |n|
found = true if target % n == 0
break if found
end
puts found == true ? 'OK' : 'NG' | input = readlines()
target = input.shift().chomp.to_i
list = input.shift().chomp.split("\s").map{|x| x.to_i}
found = false
(list[0]..list[1]).each do |n|
found = true if n % target == 0
break if found
end
puts found == true ? 'OK' : 'NG' | [["-", 8, 736, 0, 751, 15, 738, 31, 738, 31, 22], ["-", 8, 736, 0, 751, 15, 738, 31, 738, 17, 109], ["+", 8, 736, 0, 751, 15, 738, 31, 738, 17, 109], ["+", 8, 736, 0, 751, 15, 738, 31, 738, 12, 22]] | 4 | 87 |
#include <bits/stdc++.h>
int main(void) {
int k, a, b;
std::cin >> k;
std::cin >> a >> b;
int range = (b / k) * k;
if (range >= a) {
std::cout << "OK" << std::endl;
} else {
std::cout << "NO" << std::endl;
}
} | #include <bits/stdc++.h>
int main(void) {
int k, a, b;
std::cin >> k;
std::cin >> a >> b;
int range = (b / k) * k;
if (range >= a) {
std::cout << "OK" << std::endl;
} else {
std::cout << "NG" << std::endl;
}
} | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 76 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int k, a, b, flag = 1;
cin >> k;
cin >> a >> b;
for (int i = a; i <= b; ++i) {
if (k % i == 0) {
flag = 0;
break;
}
}
if (flag == 1) {
cout << "NG";
} else {
cout << "OK";
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int k, a, b, flag = 1;
cin >> k;
cin >> a >> b;
for (int i = a; i <= b; ++i) {
if (i % k == 0) {
flag = 0;
break;
}
}
if (flag == 1) {
cout << "NG";
} else {
cout << "OK";
}
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 90 |
def main():
k = int(input())
a,b = map(int,input().split())
flag = 0
for i in range(a, b + 1):
if i % k == 0:
flag += 1
if flag > 0:
print('OK')
else:
print('NO')
main() | def main():
k = int(input())
a,b = map(int,input().split())
flag = 0
for i in range(a, b + 1):
if i % k == 0:
flag += 1
if flag > 0:
print('OK')
else:
print('NG')
main() | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 76 |
#include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (a % k == 0)
cout << "OK" << endl;
else if (a + (a - a % k) <= b)
cout << "OK" << endl;
else
cout << "NG" << endl;
} | #include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (a % k == 0)
cout << "OK" << endl;
else if (a + (k - a % k) <= b)
cout << "OK" << endl;
else
cout << "NG" << endl;
} | [["-", 51, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 31, 22]] | 1 | 75 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int z = sc.nextInt();
boolean b = true;
for (int i = y; i <= z; i++) {
if (i % x == 0)
b = false;
}
if (... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int z = sc.nextInt();
boolean b = true;
for (int i = y; i <= z; i++) {
if (i % x == 0)
b = false;
}
if (... | [["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 124 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
bool a = false;
for (int i = 0; i < B - A + 1; i++) {
if (A % K == 0) {
a = true;
break;
}
A++;
}
if (a) {
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 X = A;
bool a = false;
for (int i = 0; i < B - X + 1; i++) {
if (A % K == 0) {
a = true;
break;
}
A++;
}
if (a) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
| [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22]] | 1 | 96 |
K = int(input())
A,B = map(int, input().split())
if A % K == 0:
print('OK')
else:
if B % K ==0:
print('OK')
else:
if (A // K)*(K+1) <= B:
print('OK')
else:
print('NG')
| K = int(input())
A,B = map(int, input().split())
if A % K == 0:
print('OK')
else:
if B % K == 0:
print('OK')
else:
if (A // K+1)*K <= B:
print('OK')
else:
print('NG')
| [["-", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["-", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["-", 15, 666, 0, 657, 12, 23, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 83 |
n=int(input())
j,k=map(int,input().split())
f=1
if k-j>=n:
print('OK')
f=0
else:
for i in range(j,k):
if i%n==0:
print('OK')
f=0
break
if f==1:
print("NG") | n=int(input())
j,k=map(int,input().split())
f=1
if k-j>=n:
print('OK')
f=0
else:
for i in range(j,k+1):
if i%n==0:
print('OK')
f=0
break
if f==1:
print("NG") | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 83 |
def main():
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
if i%k == 0:
print("Yes")
return
print("No")
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
print("NG")
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 | 71 |
k = int(input())
a,b = list(map(int,input().split()))
ans = 'NG'
for i in range(a,b):
if i % k == 0:
ans = 'OK'
print(ans)
| k = int(input())
a,b = list(map(int,input().split()))
ans = 'NG'
for i in range(a,b+1):
if i % k == 0:
ans = 'OK'
print(ans)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK" << endl;
break;
}
cout << "NG" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
}
| [["-", 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], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 73 |
k=int(input())
a,b=map(int,input().split())
x=b%k
y=b-x
if b-a>k:
print('OK')
elif y>a:
print('OK')
elif a==b and a%k==0:
print('OK')
else:
print('NG') | k=int(input())
a,b=map(int,input().split())
x=b%k
y=b-x
if b-a>k:
print('OK')
elif y>a:
print('OK')
elif a%k==0:
print('OK')
else:
print('NG') | [["-", 0, 57, 75, 665, 15, 679, 31, 666, 667, 60], ["-", 0, 57, 75, 665, 15, 679, 31, 666, 0, 22], ["-", 0, 656, 0, 57, 75, 665, 15, 679, 17, 355], ["-", 75, 665, 15, 679, 12, 666, 0, 657, 31, 22]] | 5 | 83 |
#include <iostream>
using namespace std;
int main() {
int x, a, b;
cin >> x;
cin >> a >> b;
int i;
for (int i = a; i <= b; ++i)
if (i % x == 0)
break;
if (i == b + 1)
cout << "NG" << endl;
else
cout << "OK" << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x, a, b;
cin >> x;
cin >> a >> b;
int i;
for (i = a; i <= b; ++i)
if (i % x == 0)
break;
if (i == b + 1)
cout << "NG" << endl;
else
cout << "OK" << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40]] | 1 | 84 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 110 |
n = int(input())
a, b = map(int, input().split())
for i in range(10000):
if a <= n * i <= b:
print("OK")
break
else:
print("NO") | n = int(input())
a, b = map(int, input().split())
for i in range(10000):
if a <= n * i <= b:
print("OK")
break
else:
print("NG")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 56 |
/*
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<map>
#include<math.h>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
#include<stdio.h>
#include<stdlib.h>
#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;... | /*
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<map>
#include<math.h>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
#include<stdio.h>
#include<stdlib.h>
#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;... | [["+", 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 | 182 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
long long int mod = (long long int)1000000007;
using namespace std;
void solve() {
ll i, j, k, n;
std::cout.precision(10);
int yes = 0;
ll a, b;
cin >> k >> a >> b;
ll nearest;
if (a % k == 0) {
cout << "OK";
return;
}
nearest... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
long long int mod = (long long int)1000000007;
using namespace std;
void solve() {
ll i, j, k, n;
std::cout.precision(10);
int yes = 0;
ll a, b;
cin >> k >> a >> b;
ll nearest;
if (a % k == 0) {
cout << "OK";
return;
}
nearest... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 187 |
k=int(input())
a,b=map(int,input().split())
for i in range(1,1001):
n==k*i
if a<=n<=b:
print('OK')
exit()
else:
continue
print('NG')
| k=int(input())
a,b=map(int,input().split())
for i in range(1,1001):
n=k*i
if a<=n<=b:
print('OK')
exit()
else:
continue
print('NG')
| [["-", 0, 7, 8, 196, 0, 1, 0, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 64 |
k = int(input())
a,b = map(int, input().split())
for i in range(1,1000):
if a<= k*i <= b:
print("OK")
exit()
else:
pass
print("No") | k = int(input())
a,b = map(int, input().split())
for i in range(1,1000):
if a<= k*i <= b:
print("OK")
exit()
else:
pass
print("NG") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 61 |
//---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//---------------------... | //---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//---------------------... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 355], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 276 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 472 |
#include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
bool flag = false;
for (int i = a; i < b; i++) {
if (i % k == 0)
flag = true;
}
if (flag) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
bool flag = false;
for (int i = a; i <= b; i++) {
if (i % k == 0)
flag = true;
}
if (flag) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 85 |
K = int(input())
A, B = input().split()
x = False
for i in range(2, 501):
if int(A) <= K*i <= int(B):
x = True
if x:
print("OK")
else:
print("NG") | K = int(input())
A, B = input().split()
x = False
for i in range(1, 501):
if int(A) <= K*i <= int(B):
x = True
if x:
print("OK")
else:
print("NG") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 67 |
K=int(input())
A,B=list(map(int, input().split()))
ans='No'
for i in range (A,B+1):
if i%K:
ans='OK'
break
print(ans) | K=int(input())
A,B=list(map(int, 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], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 59 |
k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
print("OK")
else:
for i in range(a, b + 1):
if i % k == 0:
print("OK")
break
else:
print("NO") | k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
print("OK")
else:
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, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, k;
cin >> a >> b;
int res = (b - b % k);
if (res < a) {
cout << "NG";
} else
cout << "OK";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, k;
cin >> k >> a >> b;
int res = (b - b % k);
if (res < a) {
cout << "NG";
} else
cout << "OK";
}
| [["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152]] | 1 | 57 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0;
int a = 0;
int b = 0;
cin >> k >> a >> b;
bool ans = false;
int e = b - a + 1;
// aからbの数を配列で受け取って一つずつkで割った余りを調べる
vector<int> c(b - a + 1);
for (int i = 0; i < e; i++) {
c.at(i) = a;
a++;
}
for (int i = 0; i < b - a +... | #include <bits/stdc++.h>
using namespace std;
int main() {
int k = 0;
int a = 0;
int b = 0;
cin >> k >> a >> b;
bool ans = false;
int e = b - a + 1;
// aからbの数を配列で受け取って一つずつkで割った余りを調べる
vector<int> c(b - a + 1);
for (int i = 0; i < e; i++) {
c.at(i) = a;
a++;
}
for (int i = 0; i < e; i++)... | [["-", 0, 7, 15, 16, 12, 16, 31, 16, 31, 22], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 17, 33], ["-", 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], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 155 |
import java.util.Scanner;
// import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt(), a = sc.nextInt(), b = sc.nextInt();
String s = "NG";
for (int i = 500; i <= b; i++) {
if (i % k == 0) {
s = "OK";
... | import java.util.Scanner;
// import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt(), a = sc.nextInt(), b = sc.nextInt();
String s = "NG";
for (int i = a; i <= b; i++) {
if (i % k == 0) {
s = "OK";
... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 22]] | 3 | 111 |
k = int(input())
a,b = map(int, input().split)
largest = (b//k)*k
print("OK" if largest >= a else "NG") | k = int(input())
a,b = map(int, input().split())
largest = (b//k)*k
print("OK" if largest >= a else "NG") | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 45 |
k = int(input())
a, b = map(int,input().split())
for i in range(a - 1, b):
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") | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 57 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int k, a, b;
cin >> k >> a >> b;
int i = 0;
for (i = a; i <= b; i++) {
i... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int k, a, b;
cin >> k >> a >> b;
int i = 0;
for (i = a; i <= b; i++) {
i... | [["-", 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 | 114 |
def main():
k = int(input())
a, b = map(int,input().split())
for i in range(a, b):
if i%k ==0:
print('OK')
return
print('NG')
return
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
print('NG')
return
main() | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int A, B, K;
cin >> K >> A >> B;
for (int i = A; i <= B; i++) {
if (i % K == 0) {
cout << "OK" << endl;
}
if (i == B)
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int A, B, K;
cin >> K >> A >> B;
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, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 76 |
k=int(input())
a,b = map(int,input().split())
while b>=a:
if b%k==0:
print('OK')
break
b-=1
if b<a:
print('NO') | k=int(input())
a,b = map(int,input().split())
while b>=a:
if b%k==0:
print('OK')
break
b-=1
if b<a:
print('NG') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 57 |
k=int(input())
a,b=map(int, input().split())
ok=False
for i in range(a, b+1):
ok = ok or i % k
print(['NG','OK'][ok]) | k=int(input())
a,b=map(int, input().split())
ok=False
for i in range(a, b+1):
ok = ok or (i % k == 0)
print(['NG','OK'][ok]) | [["+", 0, 1, 0, 662, 12, 679, 12, 23, 0, 24], ["+", 0, 662, 12, 679, 12, 23, 0, 666, 667, 60], ["+", 0, 662, 12, 679, 12, 23, 0, 666, 0, 612], ["+", 0, 1, 0, 662, 12, 679, 12, 23, 0, 25]] | 5 | 61 |
k = int(input())
a, b = map(int, input().split())
c = 1
for i in range(a, b + 1):
if i % k == 0:
c = 1
break
if c == 1:
print("OK")
else:
print("NG") | k = int(input())
a, b = map(int, input().split())
z = 0
for i in range(a, b+1):
if i%k == 0:
z = 1
break
if z == 1:
print("OK")
else:
print("NG") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], [... | 5 | 69 |
#include <stdio.h>
int main(void) {
int A, B, K, flg, i;
flg = 0;
scanf("%d %d %d", &K, &A, &B);
for (i = A; i <= B; i++) {
if (i % K == 0) {
flg = 1;
}
}
if (flg == 0) {
printf("NO\n");
} else {
printf("OK\n");
}
return 0;
}
| #include <stdio.h>
int main(void) {
int A, B, K, flg, i;
flg = 0;
scanf("%d %d %d", &K, &A, &B);
for (i = A; i <= B; i++) {
if (i % K == 0) {
flg = 1;
}
}
if (flg == 0) {
printf("NG\n");
} else {
printf("OK\n");
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 99 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, k, t = 0;
cin >> a >> b >> k;
for (int i = a; i <= b; i++) {
if (i % k == 0)
t = 1;
}
cout << (t == 1 ? "OK" : "NG");
} | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, k, t = 0;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if (i % k == 0)
t = 1;
}
cout << (t == 1 ? "OK" : "NG");
} | [["+", 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 | 77 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
int min = A / K;
int max = B / K;
for (int i = min; i < max; i++) {
if (A <= (K * i) and (K * i) <= B) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K;
cin >> A >> B;
int min = A / K;
int max = B / K;
for (int i = min; i <= max; i++) {
if (A <= (K * i) and (K * i) <= B) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 101 |
#include <iostream>
using namespace std;
int main() {
int want = 0, hi = 0, low = 0;
cin >> want >> low >> hi;
bool ans = false;
while (low < hi) {
if (low % want == 0) {
ans = true;
break;
}
low++;
}
if (ans) {
cout << "OK" << endl;
}
else {
cout << "NG" << endl;
... | #include <iostream>
using namespace std;
int main() {
int want = 0, hi = 0, low = 0;
cin >> want >> low >> hi;
bool ans = false;
while (low <= hi) {
if (low % want == 0) {
ans = true;
break;
}
low++;
}
if (ans) {
cout << "OK" << endl;
}
else {
cout << "NG" << endl;
... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]] | 1 | 90 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
while (A <= B) {
if (A % K == 0) {
cout << "OK" << endl;
return 0;
}
A++;
}
cout << "No" << endl;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
while (A <= B) {
if (A % K == 0) {
cout << "OK" << endl;
return 0;
}
A++;
}
cout << "NG" << endl;
} | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 69 |
K = int(input())
A, B = map(int, input().split())
large = (B // K) * K
print(large)
if A <= large:
print("OK")
else:
print("NG")
| K = int(input())
A, B = map(int, input().split())
large = (B // K) * K
if A <= large:
print("OK")
else:
print("NG")
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 56 |
k=gets.to_i
a,b=gets.split(' ').map(&:to_i)
b/k*k>=a ?(puts "Yes"):(puts "No") | k=gets.to_i
a,b=gets.split(' ').map(&:to_i)
b/k*k>=a ?(puts "OK"):(puts "NG") | [["-", 64, 739, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 739, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 739, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 739, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 44 |
k=int(input())
a,b=map(int,input().split())
for i in range(1000):
if a<=k*i<=b:
print("OK")
else:
pass
print("NG") | k=int(input())
a,b=map(int,input().split())
for i in range(10000):
if a<=k*i<=b:
print("OK")
exit()
else:
pass
print("NG") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
for (int i = b; i <= c; i++) {
if (i % a == 0) {
cout << "OK";
}
}
cout << "NG" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
for (int i = b; i <= c; i++) {
if (i % a == 0) {
cout << "OK" << endl;
return 0;
}
}
cout << "NG" << endl;
}
| [["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35]] | 1 | 67 |
#include <bits/stdc++.h>
#define ASORT(arr, n) sort(arr, arr + n)
#define SORT(v) sort(v.begin(), v.end())
#define REV(v) reverse(v.begin(), v.end())
#define FOR(i, n) for (int i = 0; i < n; i++)
#define fastIO() \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define ASORT(arr, n) sort(arr, arr + n)
#define SORT(v) sort(v.begin(), v.end())
#define REV(v) reverse(v.begin(), v.end())
#define FOR(i, n) for (int i = 0; i < n; i++)
#define fastIO() \
ios_base::sync_with_stdio(0); ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 145 |
def solve():
ans = []
for i, (x, y) in enumerate(s):
if num[x]>num[y]: x, y = y, x
if num[x]==num[y] and i < n-1:
if y == s[i+1][0] or y == s[i+1][1]:
x, y = y, x
num[x]+=1
num[y]-=1
ans.append(x)
if num[y]<0: return False
return Tr... | def solve():
ans = []
for i, (x, y) in enumerate(s):
if num[x]>num[y]: x, y = y, x
if num[x]==num[y] and i < n-1:
if y == s[i+1][0] or y == s[i+1][1]:
x, y = y, x
num[x]+=1
num[y]-=1
ans.append(x)
if num[y]<0: return False
return an... | [["-", 0, 656, 0, 14, 8, 196, 0, 37, 0, 146], ["+", 0, 656, 0, 14, 8, 196, 0, 37, 0, 22]] | 5 | 238 |
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
n, a, b, c = map(int, input().split())
query = []
for _ in range(n):
s = input().rstrip()
query.append(s)
ans = []
for i, s in enumerate(query):
if s == "AB":
if a == 0 and b == 0:
print("No")
exit()
e... | #!/usr/bin/env python3
import sys
input = sys.stdin.readline
n, a, b, c = map(int, input().split())
query = []
for _ in range(n):
s = input().rstrip()
query.append(s)
ans = []
for i, s in enumerate(query):
if s == "AB":
if a == 0 and b == 0:
print("No")
exit()
e... | [["-", 0, 57, 15, 679, 31, 666, 0, 657, 17, 33], ["-", 0, 57, 15, 679, 31, 666, 0, 657, 12, 612]] | 5 | 455 |
n, *a = [int(i) for i in input().split()]
abc = "ABC"
xy = []
for _ in range(n):
xy.append([abc.index(i) for i in input()])
i = 0
ans = []
while i < n:
if a[xy[i][0]] == 1 and a[xy[i][1]] == 1:
j = list(set([0, 1, 2])-set(xy[i]))[0]
if i == n - 1 or a[j] != 0 or xy[i] == xy[i+1]:
if ... | n, *a = [int(i) for i in input().split()]
abc = "ABC"
xy = []
for _ in range(n):
xy.append([abc.index(i) for i in input()])
i = 0
ans = []
while i < n:
if a[xy[i][0]] == 1 and a[xy[i][1]] == 1:
j = list(set([0, 1, 2])-set(xy[i]))[0]
if i == n - 1 or a[j] != 0 or xy[i] == xy[i+1]:
if ... | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 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, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 457 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long int LL;
typedef pair<int, int> P;
typedef pair... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long int LL;
typedef pair<int, int> P;
typedef pair... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 747 |
K = int(input())
A, B = map(int, input().split())
if B // K * K >= A:
print('OK')
else:
print('NO')
| K = int(input())
A, B = map(int, input().split())
if B // K * K >= A:
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 | 47 |
def main():
k = int(input())
a,b = list(map(int,input().split()))
for i in range(a,b):
if i%k == 0:
print('OK')
return
print('NG')
if __name__=='__main__':
main()
| def main():
k = int(input())
a,b = list(map(int,input().split()))
for i in range(a,b+1):
if i%k == 0:
return print('OK')
return print('NG')
if __name__=='__main__':
main()
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38]] | 5 | 72 |
def main():
k = int(input())
a,b = list(map(int,input().split()))
for i in range(a,b):
if i%k == 0:
print('OK')
return
print('NG')
if __name__=='__main__':
main()
|
def main():
k = int(input())
a,b = list(map(int,input().split()))
for i in range(a,b+1):
if i%k == 0:
print('OK')
return
print('NG')
if __name__=='__main__':
main()
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 72 |
k=int(input())
a,b= map(int, input().split())
q=0
for i in range(1,1000):
if a<=k*i and k*i<=b:
print('OK')
q=1
if q==0:
print('NG') | k=int(input())
a,b= map(int, input().split())
q=0
for i in range(1,1000):
if a<=k*i and k*i<=b:
print('OK')
q=1
break
if q==0:
print('NG') | [["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 70 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 111 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
scanf("%d %d", &b, &c);
for (b == b; b <= a == 0; b++) {
if (b % a == 0) {
printf("OK\n");
return 0;
} else {
continue;
}
}
printf("NG\n");
return 0;
}
| #include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
scanf("%d %d", &b, &c);
for (b == b; b <= c; b++) {
if (b % a == 0) {
printf("OK\n");
return 0;
} else {
continue;
}
}
printf("NG\n");
return 0;
}
| [["-", 8, 9, 0, 7, 15, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 60], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 92 |
#include <stdio.h>
int main() {
int A, K, B, flag = 0;
scanf("%d %d %d", &K, &A, &B);
for (int i = A + 1; i < B; i++)
if (i % K == 0)
flag = 1;
if (flag == 1)
printf("OK\n");
else
printf("NG\n");
return 0;
} | #include <stdio.h>
int main() {
int A, K, B, flag = 0;
scanf("%d %d %d", &K, &A, &B);
for (int i = A; i <= B; i++)
if (i % K == 0)
flag = 1;
if (flag == 1)
printf("OK\n");
else
printf("NG\n");
return 0;
} | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (b / k - a / k > 0) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (b - b % k >= a) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 85], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 85], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 339, 51... | 1 | 61 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int k, a, b;
cin >> k >> a >> b;
cout << (a >= b / k * k ? "OK" : "NG") << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int k, a, b;
cin >> k >> a >> b;
cout << (a <= b / k * k ? "OK" : "NG") << endl;
return 0;
}
| [["-", 31, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["+", 31, 16, 12, 23, 0, 41, 15, 16, 17, 19]] | 1 | 71 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 124 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define FOR(i, n) for (int i = 0; i < n; i++)
#define PRN(n) printf("%d\n", n)
#define PRF(n) printf("%lf\n", n)
#define PRL(n) printf("%lld\n", n)
#define PRS(s) printf("%s\n", s)
#define PRC(c) printf("%c", c)
#define INI(n... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define FOR(i, n) for (int i = 0; i < n; i++)
#define PRN(n) printf("%d\n", n)
#define PRF(n) printf("%lf\n", n)
#define PRL(n) printf("%lld\n", n)
#define PRS(s) printf("%s\n", s)
#define PRC(c) printf("%c", c)
#define INI(n... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 738 |
k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
if(i%k==0):
c+=1
if(c>=1):
print("OK")
else:
print("NO") | k = int(input())
a,b = map(int,input().split())
cu = 0
for i in range(a,b+1):
if(i%k==0):
cu+=1
break
if(cu>=1):
print("OK")
else:
print("NG") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["-", 0, 656, 0, 57, 15, 23, 0, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 0, 22], ["-"... | 5 | 72 |
k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
if(i%k==0):
c+=1
if(c>=1):
print("OK")
else:
print("NO") | k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
if i%k==0:
c+=1
if c>=1:
print("OK")
else:
print("NG") | [["-", 0, 7, 8, 196, 0, 57, 15, 23, 0, 24], ["-", 0, 7, 8, 196, 0, 57, 15, 23, 0, 25], ["-", 36, 36, 0, 656, 0, 57, 15, 23, 0, 24], ["-", 36, 36, 0, 656, 0, 57, 15, 23, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 72 |
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define float long double
#define pb push_back
#define fi first
#define se second
#define vii vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
#define pq priority_queue<int>
#define test ... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define float long double
#define pb push_back
#define fi first
#define se second
#define vii vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
#define pq priority_queue<int>
#define test ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 261 |
#include <iostream>
using namespace std;
int main() {
int K;
int A, B;
cin >> K;
cin >> A >> B;
bool hikyori = false;
for (int i = 500; i <= 600; i++) {
if (i % K == 0) {
hikyori = true;
break;
}
}
if (hikyori) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}... | #include <iostream>
using namespace std;
int main() {
int K;
int A, B;
cin >> K;
cin >> A >> B;
bool hikyori = false;
for (int i = A; i <= B; i++) {
if (i % K == 0) {
hikyori = true;
break;
}
}
if (hikyori) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 92 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
bool e = false;
for (int i = a; i <= b; i++) {
if (i % k == 0)
e = true;
}
if (e = true)
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 e = false;
for (int i = a; i <= b; i++) {
if (i % k == 0)
e = true;
}
if (e == true)
cout << "OK" << endl;
else
cout << "NG" << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 83 |
#include <bits/stdc++.h>
#define ll long long
#define PI 3.14159265358979323846
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
/// https://ideone.com/Fd5s8n
int a, b, k;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if (i % k)
return cout << "OK" <... | #include <bits/stdc++.h>
#define ll long long
#define PI 3.14159265358979323846
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
/// https://ideone.com/Fd5s8n
int a, b, k;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if ((i % k) == 0)
return cout <<... | [["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 99 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (b - b % k > a) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if (b - b % k >= a) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 58 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define BIT_FLAG_0 (1 << 0) // 0000 0000 0000 0001
#define BIT_FLAG_1 (1 << 1) // 0000 0000 0000 0010
#define BIT_FLAG_2 (1 << 2) // 0000 0000 0000 0100
#define BIT_FLAG_3 (1 << 3) // 0000 0000 0000 1... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define BIT_FLAG_0 (1 << 0) // 0000 0000 0000 0001
#define BIT_FLAG_1 (1 << 1) // 0000 0000 0000 0010
#define BIT_FLAG_2 (1 << 2) // 0000 0000 0000 0100
#define BIT_FLAG_3 (1 << 3) // 0000 0000 0000 1... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 110 |
K = int(input())
A, B = map(int, input().split())
if (A-1)//K < B//K:
print('Yes')
else:
print('No') | K = int(input())
A, B = map(int, input().split())
if (A-1)//K < B//K:
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 | 51 |
k = int(input())
a, b = map(int, input().split())
while True:
if a % k == 0:
print("OK")
break
if a == b:
print("NO")
break
a += 1
| k = int(input())
a, b = map(int, input().split())
while True:
if a % k == 0:
print("OK")
break
if a == b:
print("NG")
break
a += 1 | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int k, a, b;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
cout << "OK";
return 0;
}
}
cout << "NO";
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int k, a, b;
cin >> k >> a >> b;
for (int i = a; i <= b; i++) {
if (i % k == 0) {
cout << "OK";
return 0;
}
}
cout << "NG";
}
| [["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 81 |
k = int(input)
a,b = [int(x) for x in input().split()]
ans = "NG"
for i in range(1000):
if a <= i * k and i * k <= b:
ans = "OK"
break
print(ans) | k = int(input())
a,b = [int(x) for x in input().split()]
ans = "NG"
for i in range(1000):
if a <= i * k and i * k <= b:
ans = "OK"
break
print(ans) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 62 |
#include <bits/stdc++.h>
#define Vsort(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Srep(i, a, n) for (int i = (a); i < (n); i++)
#define ll long long
#define P pair<int, int>
using namespace std;
int main() {
int k, a, b, judge = 0;
cin >> k >> a >> b;
for (int i = a; i < ... | #include <bits/stdc++.h>
#define Vsort(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Srep(i, a, n) for (int i = (a); i < (n); i++)
#define ll long long
#define P pair<int, int>
using namespace std;
int main() {
int k, a, b, judge = 0;
cin >> k >> a >> b;
for (int i = a; i < ... | [["-", 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 | 113 |
k = int(input())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
if a % 7 == 0:
print("OK")
ngflag = False
break
a += 1
if ngflag:
print("NG")
| k = int(input())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
if a % k == 0:
print("OK")
ngflag = False
break
a += 1
if ngflag:
print("NG")
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 66 |
K = int(input())
A, B = map(int,input().split())
C = A % K
if B - A >= K - 1:
print('OK')
elif C == o:
print('OK')
elif C + B - A >= K:
print('OK')
else:
print('NG') | K = int(input())
A, B = map(int,input().split())
C = A % K
if B - A >= K - 1:
print('OK')
elif C == 0:
print('OK')
elif C + B - A >= K:
print('OK')
else:
print('NG') | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612]] | 5 | 78 |
K = int(input())
A, B = map(int, input().split())
a, mod_a = divmod(A, K)
b, mod_b = divmod(B, K)
if mod_a == 0 or mod_b == 0:
print('OK')
exit()
if mod_a == mod_b:
print('NG')
else:
print('OK')
| K = int(input())
A, B = map(int, input().split())
a, mod_a = divmod(A, K)
b, mod_b = divmod(B, K)
if mod_a == 0 or mod_b == 0:
print('OK')
exit()
if a == b:
print('NG')
else:
print('OK')
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]] | 5 | 81 |
K =int(input())
A,B =map(int,input().split())
count ==0
for i in range(A,B+1):
if i%K==0:
print('OK')
count =1
break
if count ==0:
print('NG') | K =int(input())
A,B =map(int,input().split())
count =0
for i in range(A,B+1):
if i%K==0:
print('OK')
count =1
break
if count ==0:
print('NG') | [["-", 36, 36, 0, 656, 0, 1, 0, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32]] | 5 | 67 |
#include <stdio.h>
int main() {
int k;
int a;
int b;
scanf("%d", &k);
scanf("%d %d", &a, &b);
while (a < b) {
if (a % k == 0) {
printf("OK\n");
return;
}
a++;
}
printf("NG\n");
return;
} | #include <stdio.h>
int main() {
int k;
int a;
int b;
scanf("%d", &k);
scanf("%d %d", &a, &b);
while (a <= b) {
if (a % k == 0) {
printf("OK\n");
return;
}
a++;
}
printf("NG\n");
return;
} | [["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 19]] | 0 | 81 |
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
i%k==0
print("OK")
exit()
print("NG") | k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
if i%k==0:
print("OK")
exit()
print("NG")
| [["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102]] | 5 | 56 |
#include <bits/stdc++.h>
#define int long long
#define fast_io() \
; \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define int long long
#define fast_io() \
; \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152]] | 1 | 181 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (A % K != 0) {
if (B >= (A / K + 1) * K)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
else
cout << "Yes" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, A, B;
cin >> K >> A >> B;
if (A % K != 0) {
if (B >= (A / K + 1) * K)
cout << "OK" << endl;
else
cout << "NG" << endl;
}
else
cout << "OK" << endl;
} | [["-", 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 | 77 |
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define MAXX 5... | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define MAXX 5... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 108 |
def resolve():
K = int(input())
A, B = list(map(int, input().split()))
for i in range(A, B+1):
if i%K == 0:
print("Yes")
return
print("No")
if '__main__' == __name__:
resolve() | def resolve():
K = int(input())
A, B = list(map(int, input().split()))
for i in range(A, B+1):
if i%K == 0:
print("OK")
return
print("NG")
if '__main__' == __name__:
resolve() | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 74 |
#include <stdio.h>
int main() {
int K, A, B, objective = 1;
scanf("%d %d %d", &K, &A, &B);
for (int i = A; i <= B; i++) {
if (i % K == 0) {
objective = 0;
break;
}
}
(objective) ? puts("OK") : puts("NG");
return 0;
} | #include <stdio.h>
int main() {
int K, A, B, objective = 0;
scanf("%d %d %d", &K, &A, &B);
for (int i = A; i <= B; i++) {
if (i % K == 0) {
objective = 1;
break;
}
}
(objective) ? puts("OK") : puts("NG");
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 88 |
#include <stdio.h>
/*
constraints
- ALL values in input are integers.
- 1 <= A <= B <= 1000
- 1 <= K <= 1000
*/
int main() {
// multiple of K
int k, multiK;
// carry distance A - B
int a, b;
// if he can achieve the objective print OK
// if he can't achieve the objective print NG
scanf("%d", &k);
sc... | #include <stdio.h>
/*
constraints
- ALL values in input are integers.
- 1 <= A <= B <= 1000
- 1 <= K <= 1000
*/
int main() {
// multiple of K
int k, multiK;
// carry distance A - B
int a, b;
// if he can achieve the objective print OK
// if he can't achieve the objective print NG
scanf("%d", &k);
sc... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 97 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k;
cin >> k;
int a, b;
cin >> a >> b;
cout << (b >= (a + k - (a % k)) or k == 1 ? "OK" : "NG");
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int k;
cin >> k;
int a, b;
cin >> a >> b;
cout << (b >= (a + k - (a % k)) or (a % k == 0) ? "OK" : "NG");
}
| [["+", 12, 23, 0, 41, 15, 16, 12, 23, 0, 24], ["+", 15, 16, 12, 23, 0, 16, 31, 16, 31, 22], ["+", 15, 16, 12, 23, 0, 16, 31, 16, 17, 109], ["-", 12, 23, 0, 41, 15, 16, 12, 16, 12, 13], ["+", 0, 41, 15, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 41, 15, 16, 12, 23, 0, 25]] | 1 | 60 |
#include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if ((b % k) + b - a >= k) {
cout << "OK";
} else {
cout << "NG";
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int k, a, b;
cin >> k >> a >> b;
if ((b / k) * k >= a) {
cout << "OK";
} else {
cout << "NG";
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 23, 0, 16, 17, 109], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 85], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 72], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, ... | 1 | 61 |
#include <iostream>
using namespace std;
int main() {
int K, A, B, flag = 0;
cin >> K >> A >> B;
for (int i = 0; i < B - A; i++)
if ((A + i) % K == 0)
flag++;
if (flag != 0) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int K, A, B, flag = 0;
cin >> K >> A >> B;
for (int i = 0; i <= B - A; i++)
if ((A + i) % K == 0)
flag++;
if (flag != 0) {
cout << "OK" << endl;
} else {
cout << "NG" << endl;
}
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 89 |
k = int(input())
a, b = map(int, input().split())
if a == b == k:
print('OK')
elif a == b and a % k == 0:
print('OK')
else:
for i in range(a, b):
if i % k == 0:
print('OK')
break
else:
print('NG') | k = int(input())
a, b = map(int, input().split())
if a == b == k:
print('OK')
elif a == b and a % k == 0:
print('OK')
else:
for i in range(a, (b+1)):
if i % k == 0:
print('OK')
break
else:
print('NG') | [["+", 0, 7, 12, 652, 3, 4, 0, 23, 0, 24], ["+", 12, 652, 3, 4, 0, 23, 0, 657, 17, 72], ["+", 12, 652, 3, 4, 0, 23, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 23, 0, 25]] | 5 | 88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.