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 <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int a, b; cin >> a >> b; int l, r; l = a / k; r = b / k; if (l != r) cout << "OK" << endl; else if (l % k == 0 || r % k == 0) cout << "OK" << endl; else cout << "NG" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int a, b; cin >> a >> b; int l, r; l = a / k; r = b / k; if (l != r) cout << "OK" << endl; else if (a % k == 0 || b % k == 0) cout << "OK" << endl; else cout << "NG" << endl; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]]
1
93
k = int(input()) a,b = map(int,input().split()) if a%k == 0 or b%k == 0: print("OK") elif b//k - a//k >1: print("OK") else: print("NG")
k = int(input()) a,b = map(int,input().split()) if a%k == 0 or b%k == 0: print("OK") elif b//k - a//k >=1: print("OK") else: print("NG")
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 47], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 20]]
5
68
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int flag = 0; for (int i = A; i <= B; i++) { if (i % 4 == 0) { flag += 1; ...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int flag = 0; for (int i = A; i <= B; i++) { if (i % K == 0) { flag += 1; ...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 22]]
3
134
#include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define PI 3.14159265359 #define rep(i, n) for (int i = 0; i < n; ++i) #define INF 1001001001 #define MAX_X 2002 #define MAX_Y 2002 typedef long long ll; typedef...
#include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define PI 3.14159265359 #define rep(i, n) for (int i = 0; i < n; ++i) #define INF 1001001001 #define MAX_X 2002 #define MAX_Y 2002 typedef long long ll; typedef...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
126
k = int(input()) a,b = map(int,input().split()) target = a res = 'No' while target <= b: if target % k == 0: res = 'OK' target += 1 print(res)
k = int(input()) a,b = map(int,input().split()) target = a res = 'NG' while target <= b: if target % k == 0: res = 'OK' target += 1 print(res)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6]]
5
56
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> //#include"testlib.h" #define endl "\n" #define all(v) v.begin(), v.end() #define allr(s) s.rbegin(), s.rend() #define RT(s) return cout << s, 0 #define watch(x) cout << (#x) << " = " << x << endl #define sz(s) (int)(s.size()) #define PI ...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> //#include"testlib.h" #define endl "\n" #define all(v) v.begin(), v.end() #define allr(s) s.rbegin(), s.rend() #define RT(s) return cout << s, 0 #define watch(x) cout << (#x) << " = " << x << endl #define sz(s) (int)(s.size()) #define PI ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
251
n=int(input()) a,b=map(int,input().split()) for i in range(a,b): if i%n==0: print("OK") break else: continue else: print("NG")
n=int(input()) a,b=map(int,input().split()) for i in range(a,b+1): if i%n==0: print("OK") break else: continue else: print("NG")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
59
K = int(input()) A, B = map(int, input().split()) Flag = False for i in range(A, B+1): if i % K == 0: Flag = True break if Flag: print("OK") else: print("NO")
K = int(input()) A, B = map(int, input().split()) Flag = False for i in range(A, B+1): if i % K == 0: Flag = True break if Flag: 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
67
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; for (; a <= b; ++a) { if (b % a == 0) { cout << "OK"; return 0; } } cout << "NG"; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; for (; a <= b; ++a) { if (a % k == 0) { cout << "OK"; return 0; } } cout << "NG"; }
[["-", 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
64
k = int(input()) x,y = map(int,input().split()) if x%k==0: print("OK") elif (x//k+1)*k<y: print("OK") else: print("NG")
k = int(input()) x,y = map(int,input().split()) if x%k==0: print("OK") elif (x//k+1)*k<=y: print("OK") else: print("NG")
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 18], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 19]]
5
64
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; for (int i = 0;; i++) { i++; if (i * k >= a && i * k <= b) { cout << "OK" << endl; break; } if (i * k > b) { cout << "NG" << endl; break; } } }
#include <iostream> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; for (int i = 0;; i++) { if (i * k >= a && i * k <= b) { cout << "OK" << endl; break; } if (i * k > b) { cout << "NG" << endl; break; } } }
[["-", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
89
/* author: blue_matrix */ #include <bits/stdc++.h> using namespace std; #define n_l '\n' #define dbg(...) \ cout << "[" << #__VA_ARGS__ << "]: "; \ cout << to_string(__VA_ARGS__) << endl template <typename T, s...
/* author: blue_matrix */ #include <bits/stdc++.h> using namespace std; #define n_l '\n' #define dbg(...) \ cout << "[" << #__VA_ARGS__ << "]: "; \ cout << to_string(__VA_ARGS__) << endl template <typename T, s...
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 355], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106]]
1
801
#include "bits/stdc++.h" #include <iostream> using namespace std; typedef long long ll; using graph = vector<vector<ll>>; int main() { ll k, a, b, mem; cin >> k; cin >> a >> b; mem = a / k; if (k * mem == a) { cout << "OK" << endl; } else if (k * (mem + 1) > a && k * (mem + 1) < b) { cout << "OK" <...
#include "bits/stdc++.h" #include <iostream> using namespace std; typedef long long ll; using graph = vector<vector<ll>>; int main() { ll k, a, b, mem; cin >> k; cin >> a >> b; mem = a / k; if (k * mem == a) { cout << "OK" << endl; } else if (k * (mem + 1) > a && k * (mem + 1) <= b) { cout << "OK" ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
122
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); boolean flag = false; for (int i = a; i <= b; i++) { if (i % k == 0) { flag =...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); boolean flag = false; for (int i = a; i <= b; i++) { if (i % k == 0) { flag =...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
132
#include <algorithm> #include <assert.h> #include <bitset> #include <cfloat> #include <complex> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include...
#include <algorithm> #include <assert.h> #include <bitset> #include <cfloat> #include <complex> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
163
#include <bits/stdc++.h> using namespace std; int main() { int k; int a, b; cin >> a >> b; int x = b / k; int y = x * k; if (y >= a && y <= b) cout << "OK"; else cout << "NG"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int k; int a, b; cin >> k >> a >> b; int x = b / k; int y = x * k; if (y >= a && y <= b) cout << "OK"; else cout << "NG"; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152]]
1
66
k=int(input()) ab=list(map(int, input().split())) a=ab[0] b=ab[1] ak=(a+1)//k bk=b//k if a%k==0: print('OK') elif ak!=bk: print('OK') else: print('NG')
k=int(input()) ab=list(map(int, input().split())) a=ab[0] b=ab[1] ak=(a)//k bk=b//k if a%k==0: print('OK') elif ak!=bk: print('OK') else: print('NG')
[["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612]]
5
83
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define m1(x) memset(x, -1, sizeof(x)) const int INF = 1e9 + 1; const ll MOD = 1e9 + 7; const double PI = 3.14159265358979323846264...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define m1(x) memset(x, -1, sizeof(x)) const int INF = 1e9 + 1; const ll MOD = 1e9 + 7; const double PI = 3.14159265358979323846264...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12,...
1
148
/* 我的心脏怦怦跳,监管者就在附近 name: Algorithm: writer:Lxs(cdx) place: nothing is impossible */ #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unistd.h> #defin...
/* 我的心脏怦怦跳,监管者就在附近 name: Algorithm: writer:Lxs(cdx) place: nothing is impossible */ #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unistd.h> #defin...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
162
#include <bits/stdc++.h> #include <math.h> #include <string> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int k; cin >> k; int a, b; cin >> a >> b; if (a > b) swap(a, b); int t = (a / k) - ((b - 1) / k); if (t) cout << "OK"; else cout <...
#include <bits/stdc++.h> #include <math.h> #include <string> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int k; cin >> k; int a, b; cin >> a >> b; if (a < b) swap(a, b); int t = (a / k) - ((b - 1) / k); if (t) cout << "OK"; else cout <...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
104
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 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, 6]]
1
497
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin()...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin()...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
125
def main(): K=int(input()) A,B=map(int,input().split()) if A%K==0 or B%K==0 or int(B%K)>int(A%K): print("OK") else: print("NG") if __name__=='__main__': main()
def main(): K=int(input()) A,B=map(int,input().split()) if A%K==0 or B%K==0 or (B//K)>(A//K): print("OK") else: print("NG") if __name__=='__main__': main()
[["-", 0, 57, 15, 679, 12, 666, 0, 652, 63, 22], ["-", 12, 666, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 15, 679, 12, 666, 0, 23, 0, 657, 17, 676]]
5
80
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; if (a % k > b % k || a % k == 0 || b % k == 0 || b - a >= 7) { cout << "OK"; } else { cout << "NG"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; if (a % k > b % k || a % k == 0 || b % k == 0 || b - a >= k) { cout << "OK"; } else { cout << "NG"; } return 0; }
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
75
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; cout << ((b / k * k >= a) ? "NG" : "OK") << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; cout << ((b / k * k >= a) ? "OK" : "NG") << endl; }
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
51
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define IO std::ios::sync_with_stdio(false) #define ll long long #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, l, r) for (int i = l; i >= r; i--) #define mset(s, _) memset(s, _, sizeof(s)) #define pb push_ba...
#pragma GCC optimize(2) #pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define IO std::ios::sync_with_stdio(false) #define ll long long #define rep(i, l, r) for (int i = l; i <= r; i++) #define per(i, l, r) for (int i = l; i >= r; i--) #define mset(s, _) memset(s, _, sizeof(s)) #define pb push_ba...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]]
1
288
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define MIN(a, b) ((a) > (b) ? (b) : (a)) #define MAX(a, b) ((a) < (b) ? (b) : (a)) const long long INF = 1LL << 60; typedef unsigned long long ll; const long long MOD = 1000000000 + 7; template <class T> inline bool...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define MIN(a, b) ((a) > (b) ? (b) : (a)) #define MAX(a, b) ((a) < (b) ? (b) : (a)) const long long INF = 1LL << 60; typedef unsigned long long ll; const long long MOD = 1000000000 + 7; template <class T> inline bool...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
206
#include <stdio.h> int main() { int k = 0, a = 0, b = 0, boo = 0; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { boo = 1; break; } } if (boo == 1) printf("OK\n"); else printf("NO\n"); return 0; }
#include <stdio.h> int main() { int k = 0, a = 0, b = 0, boo = 0; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { boo = 1; break; } } if (boo == 1) printf("OK\n"); else 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
106
// // main.cpp // ABC164 // // Copyright © 2020 エロやん. All rights reserved. // #include <iostream> using namespace std; int main() { int K, A, B; bool frag = false; cin >> K; cin >> A >> B; for (int i = A; i <= B; i++) { if (i % K == 0) { frag = true; } } if (frag) cout << "OK"; e...
// // main.cpp // ABC164 // // Copyright © 2020 エロやん. All rights reserved. // #include <iostream> using namespace std; int main() { int K, A, B; bool frag = false; cin >> K; cin >> A >> B; for (int i = A; i <= B; i++) { if (i % K == 0) { frag = true; } } if (frag) cout << "OK"; e...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
90
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; int i = 0; cin >> a; cin >> b; cin >> c; i = b; d = 0; while (i < c) { if (i % a == 0) { d = 1; break; } i++; } if (d == 0) { cout << "NG"; } else { cout << "OK"; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; int i = 0; cin >> a; cin >> b; cin >> c; i = b; d = 0; while (i <= c) { if (i % a == 0) { d = 1; break; } i++; } if (d == 0) { cout << "NG"; } else { cout << "OK"; } }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
96
#include <iostream> typedef long long ll; #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, s, n) for (ll i = s; i < (n); i++) using namespace std; int main() { int k, a, b; cin >> k; cin >> a >> b; bool flag = false; rep2(i, a, b) { if (i % k == 0) { flag = true; break; } ...
#include <iostream> typedef long long ll; #define rep(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, s, n) for (ll i = s; i < (n); i++) using namespace std; int main() { int k, a, b; cin >> k; cin >> a >> b; bool flag = false; rep2(i, a, b + 1) { if (i % k == 0) { flag = true; break; ...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
107
a=int(input()) b,c=map(int,input().split()) if c-b>=c%a: print("Yes") else: print("No")
a=int(input()) b,c=map(int,input().split()) if c-b>=c%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
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int k, a, b; cin >> k >> a >> b; bool s = false; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << endl; s = true; continue; } else { } } if (s == fal...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int k, a, b; cin >> k >> a >> b; bool s = false; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << endl; s = true; break; } else { } } if (s == false)...
[["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
1
97
#include <stdio.h> int main(void) { int k, a, b, flag = 0; scanf("%d %d %d", &k, &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { flag = 1; } break; } if (flag == 0) { printf("NG"); } else { printf("OK"); } return 0; }
#include <stdio.h> int main(void) { int k, a, b, flag = 0; scanf("%d %d %d", &k, &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { flag = 1; break; } } if (flag == 0) { printf("NG"); } else { printf("OK"); } return 0; }
[["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
0
96
#include <iostream> using namespace std; int main() { int k; cin >> k; int a, b; cin >> a >> b; int c = 0; for (int i = a; i <= b; i++) { if (i % 7 == 0) { c++; break; } } if (c > 0) cout << "OK"; else cout << "NG"; }
#include <iostream> using namespace std; int main() { int k; cin >> k; int a, b; cin >> a >> b; int c = 0; for (int i = a; i <= b; i++) { if (i % k == 0) { c++; break; } } if (c > 0) cout << "OK"; else cout << "NG"; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
85
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n, a, b; for (int i = a; i <= b; i++) { if (i % n == 0) { cout << "OK" << endl; break; } if (i == b) { cout << "NG" << endl; } } }
#include <iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; for (int i = a; i <= b; i++) { if (i % n == 0) { cout << "OK" << endl; break; } if (i == b) { cout << "NG" << endl; } } }
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 34, 12, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
79
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int k, a, b; cin >> k >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << endl; return 0; } } cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int k, a, b; cin >> k >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << endl; return 0; } } cout << "NG" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
83
#include <bits/stdc++.h> using namespace std; int main(void) { int K, A, B; cin >> K >> A >> B; for (int i = A; i <= B; i++) { if (i % K == 0) { printf("OK\n"); return 0; } } printf("NO\n"); return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int K, A, B; cin >> K >> A >> B; for (int i = A; i <= B; i++) { if (i % K == 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]]
1
76
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; for (int i = 1; i <= b; i++) { if (i % k == 0) { cout << "OK"; return 0; } } cout << "NG"; return 0; }
#include <bits/stdc++.h> using namespace std; 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"; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22]]
1
71
k = int(input()) a, b = map(int, input().split(' ')) num = k while num < b: if a < num: print("Yes") exit() num += k print("No")
k = int(input()) a, b = map(int, input().split(' ')) num = k while num <= b: if a <= num: print("OK") exit() num += k print("NG")
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
58
#define _USE_MATH_DEFINES #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #i...
#define _USE_MATH_DEFINES #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #i...
[["+", 51, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
301
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define pb push_back #define ll long long #define rsz resize #define mod 1000000007 #define LIMIT ...
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define pb push_back #define ll long long #define rsz resize #define mod 1000000007 #define LIMIT ...
[["+", 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
94
// 154 B #include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; int main() { int a, b, k; cin >> k; cin >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << en...
// 154 B #include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <string> #include <vector> using namespace std; int main() { int a, b, k; cin >> k; cin >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { cout << "OK" << en...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
92
import java.io.*; import java.io.BufferedReader; import java.util.*; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class Main { public static void main(final String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); ...
import java.io.*; import java.io.BufferedReader; import java.util.*; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class Main { public static void main(final String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); ...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 19]]
3
178
K = int(input()) A, B = map(int, input().split()) if (B//K - A//K)>=1 or B%K == 0 or A%K == 0: print("yes") else: print("no")
K = int(input()) A, B = map(int, input().split()) if (B//K - A//K)>=1 or B%K == 0 or A%K == 0: 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
# -*- coding: utf-8 -*- from sys import stdin from operator import itemgetter from collections import deque, Counter import math import pprint from functools import reduce # stdin = open("sample.txt") MOD = 1000000007 def keta(kazu): kazu_str = str(kazu) kazu_list = [int(kazu_str[i]) for i in range(0, len(kaz...
# -*- coding: utf-8 -*- from sys import stdin from operator import itemgetter from collections import deque, Counter import math import pprint from functools import reduce # stdin = open("sample.txt") MOD = 1000000007 def keta(kazu): kazu_str = str(kazu) kazu_list = [int(kazu_str[i]) for i in range(0, len(kaz...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
210
k = input() a, b = list(map(int, input().split())) isYes = False for i in range(a, b+1): if i % k == 0: isYes = True break print('OK' if isYes else 'NG')
k = int(input()) a, b = list(map(int, input().split())) isYes = False for i in range(a, b+1): if i % k == 0: isYes = True break print('OK' if isYes else 'NG')
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
62
int main() { int k, a, b; scanf("%d", &k); scanf("%d %d", &a, &b); int tmp = 0; for (int i = 0; tmp <= a; i++) tmp = i * k; if (tmp <= b) printf("OK"); else printf("NG"); }
int main() { int k, a, b; scanf("%d", &k); scanf("%d %d", &a, &b); int tmp = 0; for (int i = 0; tmp < a; i++) tmp = i * k; if (tmp <= b) printf("OK"); else printf("NG"); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
0
82
import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.System.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { static void solve() throws Exception { ...
import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.System.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { static void solve() throws Exception { ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 31, 22], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 31, 22]]
3
306
#include <bits/stdc++.h> using namespace std; int main() { int a, b, k; scanf("%d%d%d", &a, &b, &k); for (int i = a; i <= b; i++) { if (i % k == 0) { printf("OK"); return 0; } } printf("NG"); }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, k; scanf("%d%d%d", &k, &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { printf("OK"); return 0; } } printf("NG"); }
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22]]
1
78
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define INF 1 << 31 - 1 #define LNF 9223372036854775807 #define PI 3.14159265358979 #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) < (y) ? (y) : (x)) #define FOR(i, a, n) for (i = a; i < n; i++) #define MOD 1000000007 //#...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define INF 1 << 31 - 1 #define LNF 9223372036854775807 #define PI 3.14159265358979 #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) < (y) ? (y) : (x)) #define FOR(i, a, n) for (i = a; i < n; i++) #define MOD 1000000007 //#...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
631
k=int(input()) a,b=map(int,input().split()) print('OK' if b//k-a//k>=1 or a%k==0 else 'NO')
k=int(input()) a,b=map(int,input().split()) print('OK' if b//k-a//k>=1 or a%k==0 else 'NG')
[["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
50
from sys import stdin import math import fractions k = int(stdin.readline().rstrip()) a, b = [int(x) for x in stdin.readline().rstrip().split()] result = 0 flag = False for i in range(10000): result += k if (a <= result and b >= result): print('Yes') flag = True break if (flag == Fals...
from sys import stdin import math import fractions k = int(stdin.readline().rstrip()) a, b = [int(x) for x in stdin.readline().rstrip().split()] result = 0 flag = False for i in range(10000): result += k if (a <= result and b >= result): print('OK') flag = True break if (flag == False...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
99
k = int(input()) a, b = map(int, input().split()) import sys for i in range(a, b+1): if (i%k)==0: print('OK') sys.exit print('NG')
k = int(input()) a, b = map(int, input().split()) import sys for i in range(a, b+1): if (i%k)==0: print('OK') sys.exit(0) print('NG')
[["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
62
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define ll long long using namespace std; int n, a, b, m; bool l = 0; int main() { cin >> n >> a >> b; for (m = a; m...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define ll long long using namespace std; int n, a, b, m; bool l = 0; int main() { cin >> n >> a >> b; for (m = a; ...
[["-", 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
112
#include <stdio.h> typedef long long int64; int main() { int k, a, b; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = 0; k * i < b; i++) { if (k * i >= a && k * i <= b) { printf("OK"); return 0; } } printf("NG"); return 0; }
#include <stdio.h> typedef long long int64; int main() { int k, a, b; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = 1; k * i < b + 1; ++i) { if (k * i >= a && k * i <= b) { printf("OK"); return 0; } } printf("NG"); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 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, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]]
1
97
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++) #define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--) #define REP(i, n) rep(i, 0, n) #define REP2(i, n) rep2(i, 0, n) #define FOR(i, c) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); i++) #define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); i--) #define REP(i, n) rep(i, 0, n) #define REP2(i, n) rep2(i, 0, n) #define FOR(i, c) ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
464
K = int(input()) A, B = map(int, input()) c = 0 for i in range(A, B+1): if i % K == 0: c += 1 if c > 0: print("OK") else: print("NG")
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 > 0: print("OK") else: print("NG")
[["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
64
# -*- coding: utf-8 -*- K = int(input()) A,B = map(int, input().split()) if A%K==0 or B%K==0 or A//K<B//K: print('Yes') else: print('No')
# -*- coding: utf-8 -*- K = int(input()) A,B = map(int, input().split()) if A%K==0 or B%K==0 or A//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
60
import sys n= int(input()) a, b = map(int,input().split()) for i in range(a+1, b+1): if i % n == 0: print('OK') sys.exit() print('NG')
import sys n= int(input()) a, b = map(int,input().split()) for i in range(a, b+1): if i % n == 0: print('OK') sys.exit() print('NG')
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
64
#include <algorithm> #include <bitset> #include <deque> #include <iomanip> //小数点以下を精度良く表示 #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <math.h> #include <numeric> #include <stdio.h> #include <stdlib.h> using namespace std; typedef long...
#include <algorithm> #include <bitset> #include <deque> #include <iomanip> //小数点以下を精度良く表示 #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <math.h> #include <numeric> #include <stdio.h> #include <stdlib.h> using namespace std; typedef long...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
169
#include <algorithm> #include <algorithm> #include <array> #include <bitset> #include <complex> #include <cstdio> #include <deque> #include <exception> #include <fstream> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #incl...
#include <algorithm> #include <algorithm> #include <array> #include <bitset> #include <complex> #include <cstdio> #include <deque> #include <exception> #include <fstream> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #incl...
[["+", 0, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
1
249
#include <bits/stdc++.h> #define PI 3.14159265359 #define INF 1e9 #define LINF 1e18 #define IMOD 1000000007 #define irep(i, n) for (int i = 0; i < n; i++) #define irep2(i, a, n) for (int i = (a); i <= (int)(n); i++) #define lrep(i, n) for (long long i = 0; i < (long long)(n); i++) #define lrep2(i, a, n) for (long long...
#include <bits/stdc++.h> #define PI 3.14159265359 #define INF 1e9 #define LINF 1e18 #define IMOD 1000000007 #define irep(i, n) for (int i = 0; i < n; i++) #define irep2(i, a, n) for (int i = (a); i <= (int)(n); i++) #define lrep(i, n) for (long long i = 0; i < (long long)(n); i++) #define lrep2(i, a, n) for (long long...
[["+", 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
306
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int k; cin >> k; int a, b; cin >> a >> b; int q = b / k; if (q * k > a) { cout << "OK" << endl; } else { cout << "NG" << endl; } }
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int k; cin >> k; int a, b; cin >> a >> b; int q = b / k; if (q * 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
86
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iostream> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; const int MOD = 1e9 + 7; // 10^9 + 7 const ll inf = 1e10; using namespace std; // ------------------ コンビネーション関数 --...
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <iostream> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; const int MOD = 1e9 + 7; // 10^9 + 7 const ll inf = 1e10; using namespace std; // ------------------ コンビネーション関数 --...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
466
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define en '\n' #define fs first #define sd second const ll INF = INT64_MAX; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, a, b; cin >> n >> a >> b; bool res = false; for (int i =...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define en '\n' #define fs first #define sd second const ll INF = INT64_MAX; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, a, b; cin >> n >> a >> b; bool res = false; for (int i =...
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
127
#include <bits/stdc++.h> #define int long long #define fi first #define se second #define pii pair<int, int> #define mp make_pair #define tp tuple<int, int, int> #define mtp make_tuple using namespace std; main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int a, b, k; cin >> k >> a >> b; int val =...
#include <bits/stdc++.h> #define int long long #define fi first #define se second #define pii pair<int, int> #define mp make_pair #define tp tuple<int, int, int> #define mtp make_tuple using namespace std; main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int a, b, k; cin >> k >> a >> b; int val =...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
102
#include <stdio.h> int main(void) { int k, a, b; int sum = 0; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = a; i <= b; i++) { if (a % k == 0) { sum += 1; } } if (sum >= 1) { printf("OK\n"); } else { printf("NG\n"); } return 0; }
#include <stdio.h> int main(void) { int k, a, b; int sum = 0; scanf("%d", &k); scanf("%d %d", &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { sum += 1; } } if (sum >= 1) { printf("OK\n"); } else { printf("NG\n"); } return 0; }
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22]]
0
104
#include <bits/stdc++.h> #include <stdio.h> using namespace std; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define range(a) a.begin(), a.end() #define endl "\n" #define Yes() cout << "Yes" << endl #define No() cout << "No" << endl int main(void) { ios::sync_with_stdio(0); ...
#include <bits/stdc++.h> #include <stdio.h> using namespace std; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define range(a) a.begin(), a.end() #define endl "\n" #define Yes() cout << "Yes" << endl #define No() cout << "No" << endl int main(void) { ios::sync_with_stdio(0); ...
[["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 0, 9, 0, 57, 64, 9, 0, 37, 0, 13]]
1
123
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; scanf("%d%d%", &k, &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { printf("OK\n"); return 0; } } printf("NG\n"); }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; scanf("%d%d%d", &k, &a, &b); for (int i = a; i <= b; i++) { if (i % k == 0) { printf("OK\n"); return 0; } } printf("NG\n"); }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
80
k = int(input()) a,b = map(int,input().split(" ")) can = False for i in range(a,b+1): if k % i == 0: can = True if can: print("OK") else: print("NG")
k = int(input()) a,b = map(int,input().split(" ")) can = False for i in range(a,b+1): if i % k == 0: can = True if can: print("OK") else: print("NG")
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
69
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { long long ans = 0; int k, a, b; cin >> k >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { ans == 1; } } cout << (ans ? "OK" : "NG") << endl; return 0; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { long long ans = 0; int k, a, b; cin >> k >> a >> b; for (int i = a; i <= b; i++) { if (i % k == 0) { ans = 1; } } cout << (ans ? "OK" : "NG") << endl; return 0; }
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]]
1
89
k = int(input()) a, b = list(map(int, input().split())) count = 0 for ele in range(a, b): if ele % k == 0: print("OK") count += 1 break if count == 0: print("NG")
k = int(input()) a, b = list(map(int, input().split())) count = 0 for ele in range(a, b+1): if ele % k == 0: print("OK") count += 1 break if count == 0: print("NG")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
68
k=int(input()) f=0 a,b=map(int,input().split()) for i in range(a,b+1): if i%k==0: print("OK") break f=1 if f==0: print("NG")
k=int(input()) f=0 a,b=map(int,input().split()) for i in range(a,b+1): if i%k==0: print("OK") f=1 break if f==0: print("NG")
[["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
67
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int cn = 0; for (int i = a; i <= b; i++) { if (i % k == 0) cn++; } if (cn > 0) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int cn = 0; for (int i = a; i <= b; i++) { if (i % k == 0) cn++; } if (cn > 0) cout << "OK" << endl; else cout << "NG" << 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
82
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI acos(-1) #define vi vector<int> #define pi pair<int, int> #define pl pair<ll, ll> template <class T> istream &operator>>(istream &is, vector<T> &v) { for (auto &elemnt : v) is >> elemnt; return is; } template <class T, class U> istrea...
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI acos(-1) #define vi vector<int> #define pi pair<int, int> #define pl pair<ll, ll> template <class T> istream &operator>>(istream &is, vector<T> &v) { for (auto &elemnt : v) is >> elemnt; return is; } template <class T, class U> istrea...
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
214
K = int(input()) A, B = map(int, input().split()) if A % K == 0 or B//K != A//K: print("OK") else: print("NO")
K = int(input()) A, B = map(int, input().split()) if A % K == 0 or B//K != A//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
53
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <functional> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #include <cctype> #include <cm...
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <functional> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #include <cctype> #include <cm...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
1,448
#include <bits/stdc++.h> using namespace std; typedef long long ll; using P = pair<int, int>; /* ちゃんと考えてわかって実装 */ int main(void) { int k, a, b; cin >> k >> a >> b; int flag = 0; for (int i = a; i <= b; i++) { if (i % k == 0) { flag = 1; } } if (flag == 1) cout << "OK"; else cout << ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; using P = pair<int, int>; /* ちゃんと考えてわかって実装 */ int main(void) { int k, a, b; cin >> k >> a >> b; int flag = 0; for (int i = a; i <= b; i++) { if (i % k == 0) { flag = 1; } } if (flag == 1) cout << "OK"; else cout << ...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
101
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; bool ret = false; int num = k; while (num < b) { num += k; if (num >= a && num <= b) { ret = true; break; } } cout << (ret ? "OK" : "NG") << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; bool ret = false; int num = 0; while (num < b) { num += k; if (num >= a && num <= b) { ret = true; break; } } cout << (ret ? "OK" : "NG") << endl; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
83
K = int(input()) A,B = map(int,input().split()) ans = 'NG' if A % K == 0: ans = 'OK' elif B % K == 0: ans = 'OK' x = A // K y = A // K if y > x: ans = 'OK' print(ans)
K = int(input()) A,B = map(int,input().split()) ans = 'NG' if A % K == 0: ans = 'OK' elif B % K == 0: ans = 'OK' x = A // K y = B // K if y > x: ans = 'OK' print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22]]
5
77
#include <bits/stdc++.h> #define F first #define S second #define MP make_pair #define pb push_back #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define LCM(a, b) (a) / __gcd((a), (b)) * (b) #define CEIL(a, b) (a) / (b) + (((a) % (b)) ? 1 : 0) #define ln '\n' using namespace std; using LL = ...
#include <bits/stdc++.h> #define F first #define S second #define MP make_pair #define pb push_back #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define LCM(a, b) (a) / __gcd((a), (b)) * (b) #define CEIL(a, b) (a) / (b) + (((a) % (b)) ? 1 : 0) #define ln '\n' using namespace std; using LL = ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
320
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int p = (a + k - 1) / k; if (k * p <= b) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int k, a, b; cin >> k >> a >> b; int p = (a + k - 1) / k; if (k * p <= b) cout << "OK" << endl; else cout << "NG" << 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
65
#include <bits/stdc++.h> using namespace std; #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y #define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = int32_t...
#include <bits/stdc++.h> using namespace std; #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y #define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = int32_t...
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
719
#include <bits/stdc++.h> #include <iostream> #include <map> using namespace std; int main() { int K; int A, B; cin >> K; cin >> A >> B; bool x = false; for (int i = A; i <= B; i++) { if (i % K == 0) { x = true; break; } } cout << (x ? "OK" : "NO") << endl; }
#include <bits/stdc++.h> #include <iostream> #include <map> using namespace std; int main() { int K; int A, B; cin >> K; cin >> A >> B; bool x = false; for (int i = A; i <= B; i++) { if (i % K == 0) { x = true; break; } } cout << (x ? "OK" : "NG") << endl; }
[["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
87
#include <bits/stdc++.h> #include <stdio.h> #define debug(x) cout << '>' << #x << ':' << x << endl; #define nitro ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); const int INF = 1e9 + 5; using namespace std; using ll = unsigned long long int; const ll mod = 998244353; ll ncr(int n, int r = 2) { ll ...
#include <bits/stdc++.h> #include <stdio.h> #define debug(x) cout << '>' << #x << ':' << x << endl; #define nitro ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); const int INF = 1e9 + 5; using namespace std; using ll = unsigned long long int; const ll mod = 998244353; ll ncr(int n, int r = 2) { ll ...
[["-", 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
163
K=int(input()) A,B=map(int,input().split()) def judge(): for x in range(A,B+1): if x%K==0: return 'Yes' return 'No' print(judge())
K=int(input()) A,B=map(int,input().split()) def judge(): for x in range(A,B+1): if x%K==0: return 'OK' return 'NG' print(judge())
[["-", 0, 57, 64, 196, 0, 37, 0, 557, 0, 6], ["+", 0, 57, 64, 196, 0, 37, 0, 557, 0, 6], ["-", 0, 14, 8, 196, 0, 37, 0, 557, 0, 6], ["+", 0, 14, 8, 196, 0, 37, 0, 557, 0, 6]]
5
62
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (int)(n); i++) const int MOD = 1000000007; int main() { int k, a, b; cin >> k >> a >> b; bool ok = false; for (int i = a; i <= b; i++) { /* code */ if (i % k == 0) { /* code */ ok = true...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (int)(n); i++) const int MOD = 1000000007; int main() { int k, a, b; cin >> k >> a >> b; bool ok = false; for (int i = a; i <= b; i++) { /* code */ if (i % k == 0) { /* code */ ok = true...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
111
#include <bits/stdc++.h> #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #define SAY(X) cout << (X) << endl; #include <filesystem> namespace fs = std::filesystem; #else #define DBG(X) #define SAY(X) #endif using namespace std; using ll = long long int; using ull = unsigned long long int; using ld = ...
#include <bits/stdc++.h> #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #define SAY(X) cout << (X) << endl; #include <filesystem> namespace fs = std::filesystem; #else #define DBG(X) #define SAY(X) #endif using namespace std; using ll = long long int; using ull = unsigned long long int; using ld = ...
[["+", 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
629
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> long long int ans = 0; //最大公約数 long long int getgcd(long long n, long long m) { int r; if (n > m) { long long t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; }...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> long long int ans = 0; //最大公約数 long long int getgcd(long long n, long long m) { int r; if (n > m) { long long t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; }...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
283
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int k, a, b; cin >> k >> a >> b; bool ans = false; for (int i = a; i <= b; ++i) { if (i % k == 0) ans = true; } cout << (ans) ? "OK" : "NG"; cout << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int k, a, b; cin >> k >> a >> b; bool ans = false; for (int i = a; i <= b; ++i) { if (i % k == 0) ans = true; } cout << ((ans) ? "OK" : "NG"); cout << "\n"; return 0; }
[["+", 0, 16, 12, 23, 0, 41, 15, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 16, 12, 23, 0, 25]]
1
104
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> using ...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> using ...
[["+", 0, 41, 15, 16, 31, 16, 31, 23, 0, 24], ["+", 15, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 15, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 41, 15, 16, 31, 16, 31, 23, 0, 25]]
1
185
k = int(input()) a,b = list(map(int,input().split())) #print(k,a,b) flug=0 for i in range(a,b+1): if i%k==0: print("OK") flug=1 break if flug==0: print("NO")
k = int(input()) a,b = list(map(int,input().split())) #print(k,a,b) flug=0 for i in range(a,b+1): if i%k==0: print("OK") flug=1 break if flug==0: 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 <stdio.h> int main(void) { int k, a, b; scanf("%d %d %d", &k, &a, &b); if ((b / k) - ((a - 1) / k) > 1) printf("OK"); else printf("NG"); return 0; }
#include <stdio.h> int main(void) { int k, a, b; scanf("%d %d %d", &k, &a, &b); if ((b / k) - ((a - 1) / k) > 0) printf("OK"); else printf("NG"); return 0; }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]]
0
70
K = int(input()) A, B = [int(i) for i in input().split()] i = 0; while K*i<=B: if K*i>=A: print("YES") exit() i=i+1 print("NG")
K = int(input()) A, B = [int(i) for i in input().split()] i = 0; while K*i<=B: if K*i>=A: print("OK") exit() i=i+1 print("NG")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
66
K=int(input()) A,B=map(int,input().split()) print("OK" if B-A <= B%K else "NG")
K=int(input()) A,B=map(int,input().split()) print("OK" if B-A >= B%K else "NG")
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 19], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]]
5
42
import bisect,sys import math from collections import deque def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 def mod_inv_prime(a, mod=DIV): return pow(a, m...
import bisect,sys import math from collections import deque def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 def mod_inv_prime(a, mod=DIV): return pow(a, m...
[["-", 0, 1, 0, 662, 12, 41, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 41, 0, 557, 0, 6]]
5
441
#include <bits/stdc++.h> using namespace std; int main() { int a, b, k; cin >> a >> b >> k; bool ans = false; for (int i = a; i <= b; i++) { if (i % k == 0) { ans = true; break; } } if (ans) { cout << "OK" << endl; } else { cout << "NG" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, k; cin >> k >> a >> b; bool ans = false; for (int i = a; i <= b; i++) { if (i % k == 0) { ans = true; break; } } if (ans) { 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
89
K = gets.to_i A, B = gets.split(" ").map(&:to_i) count = 0 for i in (A..B) do if i % K == 0 puts "Yes" break else count += 1 end end if count == B - A + 1 puts "No" end
K = gets.to_i A, B = gets.split(" ").map(&:to_i) count = 0 for i in (A..B) do if i % K == 0 puts "OK" break else count += 1 end end if count == B - A + 1 puts "NG" end
[["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6]]
4
65
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { int K, A, B; cin >> K >> A >> B; string result = "NG"; for (int i = K; i <= B; i++) { if (i % K == 0) result = "OK"; } cout << result << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { int K, A, B; cin >> K >> A >> B; string result = "NG"; for (int i = A; i <= B; i++) { if (i % K == 0) result = "OK"; } cout << result << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22]]
1
86