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
def main(): K = int(input()) if K%2 == 0 or K%5==0: return -1 if K % 7 == 0: L = K * 9 / 7 else: L = K * 9 for i in range(1, 10000000): x = pow(10, i, L) if x == 1: return i else: return -1 if __name__ == "__main__": ans = m...
def main(): K = int(input()) if K%2 == 0 or K%5==0: return -1 if K % 7 == 0: L = K * 9 // 7 else: L = K * 9 for i in range(1, 10000000): x = pow(10, i, L) if x == 1: return i else: return -1 if __name__ == "__main__": ans = ...
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 676]]
5
98
k = int(input()) a = 7 for i in range(1, k): if a % k == 0: print(i) exit() a = (10 * a + 7) % k print(-1)
k = int(input()) a = 7 for i in range(1, k + 1): if a % k == 0: print(i) exit() a = (10 * a + 7) % k print(-1)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
51
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int k; cin >> k; ll s = 7; int ans = -1; for (double i = 1.0; i < k; i = i + 1.0) { if (k % 2 == 0 || k % 5 == 0) break; else { s *= 10; s %= (9 * k)...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { int k; cin >> k; ll s = 7; int ans = -1; for (double i = 1.0; i < 9 * k; i = i + 1.0) { if (k % 2 == 0 || k % 5 == 0) break; else { s *= 10; s %= (9 ...
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48]]
1
113
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll qpow(ll a, ll b, ll MOD) { ll ans = 1; a %= MOD; while (b) { if (b & 1) ans = (ans * a) % MOD; a = (a * a) % MOD; b >>= 1; } return ans; } int main() { ll n; cin >> n; if (n / 7 == 0) n /= 7; ll ans = 9 * n, r...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll qpow(ll a, ll b, ll MOD) { ll ans = 1; a %= MOD; while (b) { if (b & 1) ans = (ans * a) % MOD; a = (a * a) % MOD; b >>= 1; } return ans; } int main() { ll n; cin >> n; if (n % 7 == 0) n /= 7; ll ans = 9 * n, r...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
305
k = int(input()) s = 7 s = (s * 10 + 7) % k cnt = 0 if k % 2 == 1 and not k % 5 == 0: while(1): if s == 0: cnt += 1 print(cnt) break else: s = (s * 10 + 7) % k cnt += 1 else: print(-1)
k = int(input()) s = 7 s = s % k cnt = 0 if k % 2 == 1 and not k % 5 == 0: while(1): if s == 0: cnt += 1 print(cnt) break else: s = (s * 10 + 7) % k cnt += 1 else: print(-1)
[["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["-", 12, 657, 31, 23, 0, 657, 31, 657, 17, 48], ["-", 12, 657, 31, 23, 0, 657, 31, 657, 12, 612], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
80
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> void fin(T a) { cout << a << endl; exit(0); } signed main() { ll k; cin >> k; ll now = 1; set<ll> s; for (int i = 1;; i++) { now = (now * 10 + 7) % k; if (!now) fin(i); if (s.count(now)) fin...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> void fin(T a) { cout << a << endl; exit(0); } signed main() { ll k; cin >> k; ll now = 0; set<ll> s; for (int i = 1;; i++) { now = (now * 10 + 7) % k; if (!now) fin(i); if (s.count(now)) fin...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
116
def main(): K = int(input()) Kstr = str(K) if Kstr[-1] in ('0','2','4','6','8','5'): print(-1) else: if K%7 == 0: L = (9*K)/7 else: L = 9*K S = 10 for i in range(1,K): S = S%L if S == 1: print(i)...
def main(): K = int(input()) Kstr = str(K) if Kstr[-1] in ('0','2','4','6','8','5'): print(-1) else: if K%7 == 0: L = (9*K)/7 else: L = 9*K S = 10 for i in range(1,6000000): S = S%L if S == 1: pr...
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
125
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll n, i; cin >> n; if (n % 2 == 0) cout << -1; else { ll k = 0; for (i = 1; i <= n; i++) { k = k * 10 + 7; if (k % n == 0) { cout << i; return 0; } } cout << -1; } re...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll n, i; cin >> n; if (n % 2 == 0) cout << -1; else { ll k = 0; for (i = 1; i <= n; i++) { k = k * 10 + 7; k = k % n; if (k % n == 0) { cout << i; return 0; } } cout...
[["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
91
k = int(input()) i = 0; mod = 0; while True: mod = (mod*10 + 7) % k; if mod == 0: break; i += 1; if i == k: j = -2 break; print(i+1)
k = int(input()) i = 0; mod = 0; while True: mod = (mod*10 + 7) % k; if mod == 0: break; i += 1; if i == k: i = -2 break; print(i+1)
[["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22]]
5
59
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define FOR(i, a, b) for (int i = a; i <= b; i++) #define all(v) v.begin(), v.end() #define F first #define S second #define INF 1000000000000 #define MOD 10000007 #define PI 3.14159265359 typedef long long ll; // int main() ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define FOR(i, a, b) for (int i = a; i <= b; i++) #define all(v) v.begin(), v.end() #define F first #define S second #define INF 1000000000000 #define MOD 10000007 #define PI 3.14159265359 typedef long long ll; // int main() ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
176
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { ll n; cin >> n; ll x = 0; for (int i = 1; i < 200000; i++) { x = (x * 10 + 7) % n; if (x == 0) { cout << i << endl; return 0; } } cout << -1; }
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { ll n; cin >> n; ll x = 0; for (int i = 1; i < 2000000; i++) { x = (x * 10 + 7) % n; if (x == 0) { cout << i << endl; return 0; } } cout << -1; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
76
def main(): r=input() l=len(r)-1 k = int(r) s=7 for i in range(1,l): s=(s*10+7) for i in range(l,k): s=(s*10+7)%k if s==0: print(i+1) exit() print(-1) main()
def main(): r=input() l=len(r)-1 k = int(r) s=0 for i in range(0,l): s=(s*10+7) for i in range(l,k): s=(s*10+7)%k if s==0: print(i+1) exit() print(-1) main()
[["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
89
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" using namespac...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define endl "\n" using namespac...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
114
#include <bits/stdc++.h> //#pragma GCC optimize ("-O3") using namespace std; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // const long double PI = 3.14159265358979323846; /* pi */ int main() { // ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int k; cin >> k;...
#include <bits/stdc++.h> //#pragma GCC optimize ("-O3") using namespace std; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // const long double PI = 3.14159265358979323846; /* pi */ int main() { // ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int k; cin >> k;...
[["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
129
#include <bits/stdc++.h> using namespace std; int main() { int K; //入力 cin >> K; int ans = -1; int seven = 0; for (int i = 1; i <= 1000001; i++) { seven = 10 * seven + 7; if (seven % K == 0) { ans = i + 1; break; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int K; //入力 cin >> K; int ans = -1; int seven = 0; for (int i = 1; i <= 1000001; i++) { seven = 10 * seven % K + 7; if (seven % K == 0) { ans = i; break; } } cout << ans << endl; }
[["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 109], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
78
k = int(input()) x = 7 ans = 1 flag = [False]*k while x != 0: ans += 1 x = (x*10%k+7)%k if flag[x]: ans = -1 break flag[x] = True print(ans)
k = int(input()) x = 7 ans = 1 flag = [False]*k while x%k != 0: ans += 1 x = (x*10%k+7)%k if flag[x]: ans = -1 break flag[x] = True print(ans)
[["+", 0, 656, 0, 52, 15, 666, 0, 657, 17, 109], ["+", 0, 656, 0, 52, 15, 666, 0, 657, 12, 22]]
5
63
import java.io.*; import java.math.BigInteger; import java.util.*; import javax.swing.*; public class Main { static PrintWriter out = new PrintWriter(System.out); static long[] tree; static int m = 100000000; static int k1, k2; static boolean[] vis; static tuple[] tuples; static char[] a, b; public sta...
import java.io.*; import java.math.BigInteger; import java.util.*; import javax.swing.*; public class Main { static PrintWriter out = new PrintWriter(System.out); static long[] tree; static int m = 100000000; static int k1, k2; static boolean[] vis; static tuple[] tuples; static char[] a, b; public sta...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 31, 22]]
3
1,757
#include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define FOR(variable, start, end) \ for (int variable = start; variable < end; ++variable) #define ll long long int #define vi vector<int> ...
#include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define FOR(variable, start, end) \ for (int variable = start; variable < end; ++variable) #define ll long long int #define vi vector<int> ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
171
def main(): k = int(input().strip()) if k % 2 == 0 or k % 5 == 0: print(-1) return x = 7 % k for n in range(1, k): if x == 0: print(n) return x = (10 * x + 7) % k print(-1) return if __name__ == "__main__": main()
def main(): k = int(input().strip()) if k % 2 == 0 or k % 5 == 0: print(-1) return x = 7 % k for n in range(1, k + 1): if x == 0: print(n) return x = (10 * x + 7) % k print(-1) return 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
88
K = int(input()) if K % 2 == 0 or K % 5 == 0: i = -1 else: if K % 7 == 0: K = K%7 L = 9*K a = 10 % L if a == 1: i = 1 else: for i in range(2, L+1): a = (a*10) % L if a == 1: break print(i)
K = int(input()) if K % 2 == 0 or K % 5 == 0: i = -1 else: if K % 7 == 0: K = K//7 L = 9*K a = 10 % L if a == 1: i = 1 else: for i in range(2, L+1): a = (a*10) % L if a == 1: break print(i)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 676]]
5
90
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define ocut cout #define ouct cout #define itn int struct Union { vector<ll> par; Union(ll a) { par = vector<ll>(a, -1); } ll find(ll a) { if (par[a] < 0) { ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define ocut cout #define ouct cout #define itn int struct Union { vector<ll> par; Union(ll a) { par = vector<ll>(a, -1); } ll find(ll a) { if (par[a] < 0) { ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 0, 9, 0, 57, 64, 9, 0, 37, 0, 13]]
1
490
#include <bits/stdc++.h> #include <cmath> #include <iostream> #include <limits> #include <vector> using namespace std; int main() { long long k; long long count = 0; long long x = 0; cin >> k; while (count < k) { x = ((x * 10) + 7) % k; count++; if (x == 0) { break; } } if (count...
#include <bits/stdc++.h> #include <cmath> #include <iostream> #include <limits> #include <vector> using namespace std; int main() { long long k; long long count = 0; long long x = 0; cin >> k; while (count <= k) { x = ((x * 10) + 7) % k; count++; if (x == 0) { break; } } if (coun...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
103
import sys k = int(input()) if k % 2 == 0 or k % 5 == 0: print('-1') sys.exit() s = 7 c = 1 while True: if s == 0: break s = (10 * s + 7) % k c += 1 print(c)
import sys k = int(input()) if k % 2 == 0 or k % 5 == 0: print('-1') sys.exit() s = 7 c = 1 while True: if s % k == 0: break s = (10 * s + 7) % k c += 1 print(c)
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
67
#include <bits/stdc++.h> #define ll long long int #define i(a, n) int a = n; #define l(a, n) ll a = n; #define d(a, n) double a = n; #define s(a) string a; #define c(a) \ ll a; \ ...
#include <bits/stdc++.h> #define ll long long int #define i(a, n) int a = n; #define l(a, n) ll a = n; #define d(a, n) double a = n; #define s(a) string a; #define c(a) \ ll a; \ ...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
216
// Don't have to see. start------------------------------------------ var read = require('readline').createInterface({ input : process.stdin, output : process.stdout }); var obj; var inLine = []; read.on('line', function(input) { inLine.push(input); }); read.on('close', function() { obj = init(inLine); console....
// Don't have to see. start------------------------------------------ var read = require('readline').createInterface({ input : process.stdin, output : process.stdout }); var obj; var inLine = []; read.on('line', function(input) { inLine.push(input); }); read.on('close', function() { obj = init(inLine); console....
[["-", 0, 52, 8, 556, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 556, 0, 1, 0, 27, 28, 22], ["-", 8, 556, 0, 1, 0, 2, 3, 3, 0, 22], ["+", 8, 556, 0, 1, 0, 2, 3, 3, 0, 22]]
2
618
k=int(input()) if k%7==0: k//=7 res=1 if k%2==0 or k%5==0: print(-1) else: for i in range(k): res*=10 if res%k==1%k: print(i+1) break else: res%=k
k=int(input()) if k%7==0: k//=7 res=1 if k%2==0 or k%5==0: print(-1) else: k*=9 for i in range(k): res*=10 if res%k==1: print(i+1) break else: res%=k
[["+", 75, 76, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 108], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
73
import sys k = int(input()) for i in range(k+1): d = 7 d = (10*d) + 7 d %= k if d == 0: print(i+1) sys.exit() print(-1)
import sys k = int(input()) d = 0 for i in range(k+1): d = (10*d) + 7 d %= k if d == 0: print(i+1) sys.exit() print(-1)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 12, 612]]
5
56
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <utility> #in...
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <utility> #in...
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
925
K = int(input()) if K == 7: print(1) elif K % 2 == 0 or K % 5 == 0: print(-1) else: count = 1 num = 7 while True: num = (num * 10 + 7) % K count += 1 if num == 0: print(count) break
K = int(input()) if K == 7: print(1) elif K % 2 == 0 or K % 5 == 0: print(-1) else: count = 0 num = 0 while True: num = (num * 10 + 7) % K count += 1 if num == 0: print(count) break
[["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]]
5
70
K = gets.to_i wk, x, ans = 7, 1, -1 while x < K do if wk % K == 0 then ans = x break end wk = wk % K * 10 + 7 x += 1 end puts ans
K = gets.to_i wk, x, ans = 7, 1, -1 while x <= K do if wk % K == 0 then ans = x break end wk = wk % K * 10 + 7 x += 1 end puts ans
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 18], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 19]]
4
49
#include <bits/stdc++.h> #include <unordered_map> const double PI = acos(-1); using namespace std; typedef long long ll; typedef unsigned long long ull; using P = pair<ll, ll>; using V = vector<ll>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++) #define rep2(i...
#include <bits/stdc++.h> #include <unordered_map> const double PI = acos(-1); using namespace std; typedef long long ll; typedef unsigned long long ull; using P = pair<ll, ll>; using V = vector<ll>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++) #define rep2(i...
[["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
509
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int x = k % 10; if (x == 1 || x == 3 || x == 7 || x == 9) { int y = 1; long long rem = 7 % k; for (int n = 1; n <= 1e6; n++) { if (rem == 0) { cout << k; y = 0; break; } else rem ...
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int x = k % 10; if (x == 1 || x == 3 || x == 7 || x == 9) { int y = 1; long long rem = 7 % k; for (int n = 1; n <= 1e6; n++) { if (rem == 0) { cout << n; y = 0; break; } else rem ...
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22]]
1
132
k=int(input()) if k%2==0 or k%5==0: print(-1) else: if k==7: print(1) else: a=7 for i in range(1,10**6): a=10*a+7 if a%k==0: print(i+1) break else: a=a%k
k=int(input()) if k%2==0 or k%5==0: print(-1) else: if k==7 or k==1: print(1) else: a=7 for i in range(1,10**6): a=10*a+7 if a%k==0: print(i+1) break else: a=a%k
[["+", 75, 76, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]]
5
82
k = int(input()) temp = 0 M = 10**5 for i in range(2*10**6): temp *= 10 temp += 1 temp %= k if temp == 0: print(i+1) exit() else: print(-1)
k = int(input()) temp = 0 M = 10**5 for i in range(2*10**6): temp *= 10 temp += 7 temp %= k if temp == 0: print(i+1) exit() else: print(-1)
[["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612]]
5
58
#include <algorithm> #include <chrono> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #i...
#include <algorithm> #include <chrono> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #i...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
252
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for (int64 i = 0; i < (n); i++) #define FOR(i, a, b) for (int64 i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_...
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for (int64 i = 0; i < (n); i++) #define FOR(i, a, b) for (int64 i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
443
#ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #define rep(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++) #define rrep(i, s, t) for (ll i = (ll)(s - 1); (ll)(t) <= i; i--) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef long double ld; typedef pair<ll, ll> ...
#ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #define rep(i, s, t) for (ll i = (ll)(s); i < (ll)(t); i++) #define rrep(i, s, t) for (ll i = (ll)(s - 1); (ll)(t) <= i; i--) #define all(x) (x).begin(), (x).end() typedef long long ll; typedef long double ld; typedef pair<ll, ll> ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
604
#include <bits/stdc++.h> using namespace std; #define int long long int int32_t main() { int k, i, ans = -1, tmp = 0; for (i = 1; i <= k + 100; i++) { tmp = tmp * 10 + 7; tmp %= k; if (!tmp) { ans = i; break; } } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long int int32_t main() { int k, i, ans = -1, tmp = 0; cin >> k; for (i = 1; i <= k + 100; i++) { tmp = tmp * 10 + 7; tmp %= k; if (!tmp) { ans = i; break; } } cout << ans; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
77
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <ss...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <ss...
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
187
/* * Created by Andrei Arhire 02/08/2020 * Copyright © 2020 Andrei Arhire. All rights reserved. */ #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second #define lll long long #define llf __float128 #define lld long double using namespace std; const lll NR = 1e5 + 10,...
/* * Created by Andrei Arhire 02/08/2020 * Copyright © 2020 Andrei Arhire. All rights reserved. */ #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second #define lll long long #define llf __float128 #define lld long double using namespace std; const lll NR = 1e5 + 10,...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
203
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll // [a -> b-1] #define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++) // [0 -> a-1] #define rep(i, a) reps(i, 0, (a)) // [a-1 -> b] #define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--) // [a-1 -> 0] #define rre...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll // [a -> b-1] #define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++) // [0 -> a-1] #define rep(i, a) reps(i, 0, (a)) // [a-1 -> b] #define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--) // [a-1 -> 0] #define rre...
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
1,276
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <utility> #include <vector> #define ll long long #define ull unsigned long long #define make(type, x) \ type x; ...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <utility> #include <vector> #define ll long long #define ull unsigned long long #define make(type, x) \ type x; ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
708
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "ctime" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "str...
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "ctime" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "str...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
210
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect import heapq from collections import defaultdict from collections import deque from collections import Counter from functools import lru_cache ############# # Const...
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect import heapq from collections import defaultdict from collections import deque from collections import Counter from functools import lru_cache ############# # Const...
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]]
5
1,081
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines K = int(readline()) ans = -1 x = 7 for n in range(1, K + 10): if x == 0: ans = n break x = (10 * x + 7) % K print(ans)
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines K = int(readline()) ans = -1 x = 7 % K for n in range(1, K + 10): if x == 0: ans = n break x = (10 * x + 7) % K print(ans)
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
80
package main import ( "bufio" "fmt" "io" "os" "strconv" "strings" ) func main() { io := NewIo(os.Stdin, os.Stdout) defer io.Flush() k := io.NextInt() pow := 1 num := 1 history := map[int]struct{}{} for { if _, ok := history[num]; ok { io.Println(-1) return } history[num] = struct{}{} if num...
package main import ( "bufio" "fmt" "io" "os" "strconv" "strings" ) func main() { io := NewIo(os.Stdin, os.Stdout) defer io.Flush() k := io.NextInt() pow := 1 num := 7 history := map[int]struct{}{} for { if _, ok := history[num]; ok { io.Println(-1) return } history[num] = struct{}{} if num...
[["-", 0, 435, 8, 196, 0, 431, 12, 432, 0, 433], ["+", 0, 435, 8, 196, 0, 431, 12, 432, 0, 433], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 109], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 22], ["+", 0, 436, 12, 432, 0, 16, 31, 16, 31, 433], ["+", 0, 436, 12, 432, 0, 16, 31, 16, 17, 48]]
7
487
#include <bits/stdc++.h> using namespace std; int func(int x) { int a = 7; int ans = 1; for (int i = 0; i < x; i++) { if (a % x != 0) { a = a * 10 + 7; ans++; } else { return ans; } } return -1; } int main() { long K; cin >> K; cout << func(K); }
#include <bits/stdc++.h> using namespace std; int func(int x) { long a = 7; int ans = 1; for (int i = 0; i < x; i++) { if (a % x != 0) { a = (a * 10 + 7) % x; ans++; } else { return ans; } } return -1; } int main() { long K; cin >> K; cout << func(K); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
90
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int k; cin >> k; set<int> st; int i = 10 % k; int j = 7 % k; int s = 7 % k; st.insert(j); // cout<<i<<" "<<s<<endl; if (k = 1 || k == 7) cout << 1 << endl; else { int d = 1; while (1) { s = ((i * s) ...
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int k; cin >> k; set<int> st; int i = 10 % k; int j = 7 % k; int s = 7 % k; st.insert(j); // cout<<i<<" "<<s<<endl; if (k == 1 || k == 7) cout << 1 << endl; else { int d = 1; while (1) { s = ((i * s)...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]]
1
158
#include <bits/stdc++.h> using namespace std; int main() { long long int K; cin >> K; long long int N = 7; long long int i = 1; long long int output = -1; if (K % 2 == 0) { cout << output << '\n'; return 0; } while (i < K) { if (N % K == 0) { output = i; break; } N %= ...
#include <bits/stdc++.h> using namespace std; int main() { long long int K; cin >> K; long long int N = 7; long long int i = 1; long long int output = -1; if (K % 2 == 0) { cout << output << '\n'; return 0; } while (i < 7 * K + 1) { if (N % K == 0) { output = i; break; } ...
[["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 12, 13]]
1
111
#200802C X = int(input()) L = len(str(X)) #print(L) Y = 0 for l in range(L): Y += 7*10**l flag = 0 for i in range(100000): Y = Y%X #print(i) if Y == 0: ans = L+i flag = 1 break else: Z = Y * 10 + 7 if Z == Y: break else: ...
#200802C X = int(input()) L = len(str(X)) #print(L) Y = 0 for l in range(L): Y += 7*10**l flag = 0 for i in range(1000000): Y = Y%X #print(i) if Y == 0: ans = L+i flag = 1 break else: Z = Y * 10 + 7 if Z == Y: break else: ...
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
105
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int p = 7, ans = 1; if (k % 2 == 0 || k % 5 == 0) cout << -1 << endl; else if (k == 7) cout << 1 << endl; else { while (p != 0) { p = (10 * p + 7) % k; ans++; } cout << ans << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int p = 7, ans = 1; if (k % 2 == 0 || k % 5 == 0) cout << -1 << endl; else if (k == 7 || k == 1) cout << 1 << endl; else { while (p != 0) { p = (10 * p + 7) % k; ans++; } cout << ans << endl; } }
[["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
93
#pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<ll, ll> pll; typedef vector<pair<l...
#pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<ll, ll> pll; typedef vector<pair<l...
[["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13]]
1
395
K = gets.to_i if K == 1 puts 1 exit end if K.even? puts -1 exit end if K % 5 == 0 puts -1 exit end x = 1 result = 1 while x % K != 0 do while x < K do x = x * 10 + 1 result += 1 end x = x % K end puts result
K = gets.to_i if K == 1 puts 1 exit end if K.even? puts -1 exit end if K % 5 == 0 puts -1 exit end x = 7 result = 1 while x % K != 0 do while x < K do x = x * 10 + 7 result += 1 end x = x % K end puts result
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["-", 0, 89, 8, 170, 0, 662, 12, 738, 12, 612], ["+", 0, 89, 8, 170, 0, 662, 12, 738, 12, 612]]
4
70
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl...
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
449
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int c = 1, a = 7 % k; while (a != 0) { c++; int b = (a * 10) + a; a = b % k; if (c == pow(10, 7)) { c = -1; break; } } cout << c << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int c = 1, a = 7 % k; while (a != 0) { c++; int b = (a * 10) + 7; a = b % k; if (c == pow(10, 7)) { c = -1; break; } } cout << c << endl; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
86
#include <bits/stdc++.h> using namespace std; #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) using ll = long long; using ld = long double; #define int ll #define double ld #define VARNAME(v) #v using P = pair<int, int>; constexpr int MOD = 1000000007; // constexpr int MOD = 99824...
#include <bits/stdc++.h> using namespace std; #define repd(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) repd(i, 0, n) using ll = long long; using ld = long double; #define int ll #define double ld #define VARNAME(v) #v using P = pair<int, int>; constexpr int MOD = 1000000007; // constexpr int MOD = 99824...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
1,684
K=int(input()) if K==7: print(1) else: val=7 for i in range(2,K+1): val=(val*10+7)%K if val==0: exit(print(i)) print(-1)
K=int(input()) if K==7 or K==1: print(1) else: val=7 for i in range(2,K+1): val=(val*10+7)%K if val==0: exit(print(i)) print(-1)
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]]
5
62
import sys read = sys.stdin.readline import time import math import itertools as it def inp(): return int(input()) def inpl(): return list(map(int, input().split())) start_time = time.perf_counter() # ------------------------------ k = inp() if k % 2 == 0: print(-1) if k % 7 == 0: k //= 7 n = 1 cn...
import sys read = sys.stdin.readline import time import math import itertools as it def inp(): return int(input()) def inpl(): return list(map(int, input().split())) start_time = time.perf_counter() # ------------------------------ k = inp() if k % 2 == 0: print(-1) sys.exit() if k % 7 == 0: k //= ...
[["+", 64, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
156
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ll K; cin >> K; // if (K % 2 == 0) { // cout << -1 << endl; // return(0); // } ll c = 1; ll s = 7; ll ss = 7; set<pair<ll, ll>> H; H.insert(pair<ll, ll>(s, ss)); while (true) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ll K; cin >> K; // if (K % 2 == 0) { // cout << -1 << endl; // return(0); // } ll c = 1; ll s = 7; ll ss = 7; set<pair<ll, ll>> H; H.insert(pair<ll, ll>(s, ss)); while (true) { ...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 17, 109], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
185
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() #define trav(a, x) for (auto &a : x) #define pb push_back #define eb emplace_back typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; t...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() #define trav(a, x) for (auto &a : x) #define pb push_back #define eb emplace_back typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; t...
[["+", 0, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
176
from collections import Counter def main(): K = int(input()) S = [7] * K T = [0] * len(S) if K == 7: print(1) return if K % 2 == 0 or K % 5 == 0: print(-1) return P = K T[0] = S[0] % P power = 1 ans = -1 for i in range(1, len(S)): ...
from collections import Counter def main(): K = int(input()) S = [7] * K T = [0] * len(S) if K == 7 or K == 1: print(1) return if K % 2 == 0 or K % 5 == 0: print(-1) return P = K T[0] = S[0] % P power = 1 ans = -1 for i in range(1, len(...
[["+", 0, 14, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]]
5
158
#include <bits/stdc++.h> #define IO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long long #define pii pair<...
#include <bits/stdc++.h> #define IO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long long #define pii pair<...
[["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 109], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22]]
1
88
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n, d, cnt = 1; set<ll> s; cin >> n; ll aux = 1; if (n % 7 == 0) n %= 7; while (1) { if (s.find(aux) != s.end()) { cout << "-1"; ret...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n, d, cnt = 1; set<ll> s; cin >> n; ll aux = 1; if (n % 7 == 0) n /= 7; while (1) { if (s.find(aux) != s.end()) { cout << "-1"; re...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 132], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 90]]
1
142
// By TheOneYouWant #pragma GCC optimize("-O2") #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
// By TheOneYouWant #pragma GCC optimize("-O2") #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
652
K = int(input()) j = 7%K p = -1 for i in range(1,K): if j == 0: print(i) p = 0 break j = ((j*10)+7)%K if p == -1: print("-1")
K = int(input()) j = 7%K p = -1 for i in range(1,K+1): if j == 0: print(i) p = 0 break j = ((j*10)+7)%K if p == -1: print("-1")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
65
def main(): K = int(input()) tmp1 = 7 % K tmp2 = tmp1 for i in range(1, K): if tmp2 == 0: print(i) exit() else: tmp1 = tmp1 * 10 % K tmp2 += tmp1 tmp2 %= K print(-1) if __name__ == "__main__": main()
def main(): K = int(input()) tmp1 = 7 % K tmp2 = tmp1 for i in range(1, 10**6): if tmp2 == 0: print(i) exit() else: tmp1 = tmp1 * 10 % K tmp2 += tmp1 tmp2 %= K print(-1) if __name__ == "__main__": main()
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 578], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
73
#include <algorithm> #include <bits/stdc++.h> #include <string> using namespace std; // std::の省略のため using ll = long long; ll MAX = LLONG_MAX; int main() { int k; cin >> k; bool judge = false; int ans; ll num = 7; ll rem; if (k % 2 == 0) { for (int i = 1; i <= 100000000; i++) { rem = num % k...
#include <algorithm> #include <bits/stdc++.h> #include <string> using namespace std; // std::の省略のため using ll = long long; ll MAX = LLONG_MAX; int main() { int k; cin >> k; bool judge = false; int ans; ll num = 7; ll rem; if (k % 2 != 0) { for (int i = 1; i <= 100000000; i++) { rem = num % k...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
126
#include <bits/stdc++.h> using namespace std; int main(void) { int k; cin >> k; long s = 7, cnt = 1; bool T = true; while (1) { if (s == 0) break; s = s * 10 + 7; s %= k; cnt++; if (cnt == 100000000) { T = false; break; } } if (T) cout << cnt << endl; else ...
#include <bits/stdc++.h> using namespace std; int main(void) { int k; cin >> k; long s = 7, cnt = 1; bool T = true; s %= k; while (1) { if (s == 0) break; s = s * 10 + 7; s %= k; cnt++; if (cnt == 100000000) { T = false; break; } } if (T) cout << cnt << endl...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
94
k = int(input()) import sys i = 1 amari = 7%k ama = 7%k while True: if amari%k ==0: print(i) sys.exit() else: ama = (ama*10)%k amari += ama i +=1 if i == k: break print(-1)
k = int(input()) import sys i = 1 amari = 7%k ama = 7%k while True: if amari%k ==0: print(i) sys.exit() else: ama = (ama*10)%k amari += ama i +=1 if i == k+1: break print(-1)
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]]
5
70
#include <iostream> using namespace std; int main() { int K; cin >> K; long long t = 7, s = 0; for (int i = 1; i < K; ++i) { s += t; s %= K; if (!s) { cout << i << endl; return 0; } t *= 10; t %= K; } cout << -1 << endl; }
#include <iostream> using namespace std; int main() { int K; cin >> K; long long t = 7, s = 0; for (int i = 1; i <= K; ++i) { s += t; s %= K; if (!s) { cout << i << endl; return 0; } t *= 10; t %= K; } cout << -1 << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
83
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vector<ll>> vvll; typedef vector<vector<vector<ll>>> vvvll; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vector<vector<bool>>> vvvb; typedef pair<ll, ll> pll; typedef vector<pll> vpll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vector<ll>> vvll; typedef vector<vector<vector<ll>>> vvvll; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef vector<vector<vector<bool>>> vvvb; typedef pair<ll, ll> pll; typedef vector<pll> vpll...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
684
#include <bits/stdc++.h> using namespace std; int main() { long long int n = 7, k, count = 1; cin >> k; while (n % k) { n = n % k * 10 + 7; count++; if (count >= 10000) { count = -1; break; } } cout << count; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n = 7, k, count = 1; cin >> k; while (n % k) { n = (n % k) * 10 + 7; count++; if (count >= 1000000) { count = -1; break; } } cout << count; return 0; }
[["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
71
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
261
#include <algorithm> #include <cfenv> #include <cmath> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define vint vector<int> #defi...
#include <algorithm> #include <cfenv> #include <cmath> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define vint vector<int> #defi...
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]]
1
199
n=int(input()) sm=0 work=7 for i in range(1,n): sm+=work while sm>=n: sm-=n if sm==0 : print(i) break work*=10 work%=n else : print(-1)
n=int(input()) sm=0 work=7 for i in range(1,5*n): sm+=work while sm>=n: sm-=n if sm==0 : print(i) break work*=10 work%=n else : print(-1)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 48]]
5
58
// Ayushman Tripathy, IIT Roorkee, CSE-23 #include <bits/stdc++.h> using namespace std; #define ll long long int #define db double #define fl float #define endl '\n' #define mod (ll)(1000000007) #define mod1 (ll)998242353 #define mod2 (ll)998244353 #define PI 3.1415926535897932384626433832795 #define pii pair<int, i...
// Ayushman Tripathy, IIT Roorkee, CSE-23 #include <bits/stdc++.h> using namespace std; #define ll long long int #define db double #define fl float #define endl '\n' #define mod (ll)(1000000007) #define mod1 (ll)998242353 #define mod2 (ll)998244353 #define PI 3.1415926535897932384626433832795 #define pii pair<int, i...
[["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]]
1
1,541
num = int(input()) val = 7 cnt = 1 while True: val %= num if cnt >= num: cnt = -1 break if val == 0: break val *= 10 val += 7 cnt += 1 print(cnt)
num = int(input()) val = 7 cnt = 1 while True: val %= num if cnt >= 10 ** 6: cnt = -1 break if val == 0: break val *= 10 val += 7 cnt += 1 print(cnt)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 578], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]]
5
49
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define int lon...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define int lon...
[["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13]]
1
119
#include <bits/stdc++.h> #define ll long long #define f first #define s second #define mod 1000000007 #define N 500043 #define mp(a, b) make_pair(a, b) #define loop(a, b) for (int i = a; i < b; i++) #define test \ int t; ...
#include <bits/stdc++.h> #define ll long long #define f first #define s second #define mod 1000000007 #define N 500043 #define mp(a, b) make_pair(a, b) #define loop(a, b) for (int i = a; i < b; i++) #define test \ int t; ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
132
/*input 1 1 */ /* ______________ | ) | ) / |______/ ...
/*input 1 1 */ /* ______________ | ) | ) / |______/ ...
[["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 132], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
604
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> //エイリアス using namespace std; using ll = long long; using pll = pair<ll, ll>; class S...
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> //エイリアス using namespace std; using ll = long long; using pll = pair<ll, ll>; class S...
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
294
import sys input = sys.stdin.readline def readstr(): return input().strip() def readint(): return int(input()) def readnums(): return map(int, input().split()) def readstrs(): return input().split() def main(): K = readint() if not K % 2: print(-1) elif not K % 7: p...
import sys input = sys.stdin.readline def readstr(): return input().strip() def readint(): return int(input()) def readnums(): return map(int, input().split()) def readstrs(): return input().split() def main(): K = readint() if not K % 2: print(-1) elif not 7 % K: p...
[["-", 0, 57, 75, 665, 15, 681, 28, 657, 31, 22], ["-", 0, 57, 75, 665, 15, 681, 28, 657, 17, 109], ["+", 0, 57, 75, 665, 15, 681, 28, 657, 17, 109], ["+", 0, 57, 75, 665, 15, 681, 28, 657, 12, 22]]
5
184
//----AUTHOR:kkdrummer----/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //#include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef unordered_set<ll> usll; typedef uno...
//----AUTHOR:kkdrummer----/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> //#include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; typedef unordered_set<ll> usll; typedef uno...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
881
#!/usr/bin/env python3 val1 = input() if int(val1) >= 30: print("YES") else: print("NO")
#!/usr/bin/env python3 val1 = input() if int(val1) >= 30: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
28
/* * Author : StelaYuri * Language : GNU G++ 14 */ //#pragma comment(linker,"/STACK:1024000000,1024000000") //#pragma GCC optimize(3) #include <bits/stdc++.h> //#include<unordered_map> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/hash_policy.hpp> #define closeSync ...
/* * Author : StelaYuri * Language : GNU G++ 14 */ //#pragma comment(linker,"/STACK:1024000000,1024000000") //#pragma GCC optimize(3) #include <bits/stdc++.h> //#include<unordered_map> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/hash_policy.hpp> #define closeSync ...
[["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
458
#include <bits/stdc++.h> using namespace std; int main(void) { int X; bool swi = false; cin >> X; if (X >= 30) swi = true; if (swi) cout << "Yes" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int X; bool swi = false; cin >> X; if (X >= 30) swi = true; if (swi) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
59
#include <stdio.h> void main(void) { int X; scanf("%d", &X); if (X >= 30) { printf("yes\n"); } else { printf("No\n"); } return; }
#include <stdio.h> void main(void) { int X; scanf("%d", &X); if (X >= 30) { printf("Yes\n"); } else { printf("No\n"); } return; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
51
x=int(input()) if 30<=x: print("yes") else: print("no")
x=int(input()) if 30<=x: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
27
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if (x < 30) { cout << "No" << endl; } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if (x < 30) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
[["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
43
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); if (n >= 30) { System.out.println("YES"); } else { System.out.println("NO"); } } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); if (n >= 30) { System.out.println("Yes"); } else { System.out.println("No"); } } }
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
77
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define ll long long #define add push_back using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define ll long long #define add push_back using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int ...
[["-", 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
105
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int x; cin >> x; if (x <= 30) cout << "Yes\n"; else cout << "No\n"; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int x; cin >> x; if (x >= 30) cout << "Yes\n"; else cout << "No\n"; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
47
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if (x < 30) cout << "NO" << endl; else cout << "YES" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if (x < 30) cout << "No" << endl; else cout << "Yes" << 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
42
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int test; cin >> test; if (test >= 30) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int test; cin >> test; if (test >= 30) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 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
59
#include <bits/stdc++.h> using namespace std; #define M (int)1e9 #define pi 3.1415926536 #define all(a) a.begin(), a.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define M (int)1e9 #define pi 3.1415926536 #define all(a) a.begin(), a.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
1,366
x=int(input()) if(x>=30): print("YES") else: print("NO")
x=int(input()) if(x>=30): print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
29
#include <iostream> #include <string> using namespace std; signed main() { int x; cin >> x; cout << (x >= 25 ? "Yes" : "No") << endl; return 0; }
#include <iostream> #include <string> using namespace std; signed main() { int x; cin >> x; cout << (x >= 30 ? "Yes" : "No") << endl; return 0; }
[["-", 31, 16, 12, 23, 0, 41, 15, 16, 12, 13], ["+", 31, 16, 12, 23, 0, 41, 15, 16, 12, 13]]
1
42
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define endl '\n' #define ff first #define ss second #define mp make_pair #define pb push_back #define pf pop_front #define yes cout << "YES" << '\n'; #define no cout << "NO" << '\n'; #define watch(x) cout << (#x) << " is " << (x) << endl usin...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define endl '\n' #define ff first #define ss second #define mp make_pair #define pb push_back #define pf pop_front #define yes cout << "YES" << '\n'; #define no cout << "NO" << '\n'; #define watch(x) cout << (#x) << " is " << (x) << endl usin...
[["-", 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
117
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; cout << (x >= 30 ? "YES" : "NO") << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; cout << (x >= 30 ? "Yes" : "No") << endl; return 0; }
[["-", 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
40
#include <stdio.h> int main(void) { int n; scanf("%d, &n"); if (n >= 30) { printf("Yes"); } else { printf("No"); } }
#include <stdio.h> int main(void) { int n; scanf("%d", &n); if (n >= 30) { printf("Yes"); } else { printf("No"); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
0
44