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 n, t, x; cin >> n >> x >> t; if ((double)n / x > (int)n / x) cout << t * (int)n / x + 1 << endl; else cout << t * n / x << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, t, x; cin >> n >> x >> t; if ((double)n / x > (int)n / x) cout << t * (1 + (int)n / x) << endl; else cout << t * n / x << endl; }
[["+", 31, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 16, 12, 23, 0, 16, 17, 72], ["+", 12, 23, 0, 16, 12, 16, 31, 74, 0, 24], ["-", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 25]]
1
69
#include <bits/stdc++.h> using namespace std; int main() { int n, x, t; cin >> n >> x >> t; int ans = n / x; if (n != x) ans++; ans *= t; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, t; cin >> n >> x >> t; int ans = n / x; if ((n % x) != 0) ans++; ans *= t; cout << ans << endl; }
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
53
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> #include ...
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
135
/* In the name of ALLAH */ #include <bits/stdc++.h> using namespace std; /******* All Required define Pre-Processors and Constants *******/ #define int long long #define ull unsigned long long #define ld long double #define mem(a, b) memset(a, (b), sizeof(a)) #define rep(i, j, k) for (int i = j; i < k; ++i) #def...
/* In the name of ALLAH */ #include <bits/stdc++.h> using namespace std; /******* All Required define Pre-Processors and Constants *******/ #define int long long #define ull unsigned long long #define ld long double #define mem(a, b) memset(a, (b), sizeof(a)) #define rep(i, j, k) for (int i = j; i < k; ++i) #def...
[["+", 51, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["+", 51, 2, 3, 4, 0, 16, 31, 16, 12, 13]]
1
306
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define nl cout << "\n" #define endl '\n' #define pb push_back #define se second #define fi first #define int long long #define pi pair<int, int> #define vpi vector<pi> #define vvpi vector<vpi> #define fio ios_base::sync_with_stdio(false), cin.tie(NULL),...
#include <bits/stdc++.h> #include <unistd.h> using namespace std; #define nl cout << "\n" #define endl '\n' #define pb push_back #define se second #define fi first #define int long long #define pi pair<int, int> #define vpi vector<pi> #define vvpi vector<vpi> #define fio ios_base::sync_with_stdio(false), cin.tie(NULL),...
[["-", 0, 16, 31, 16, 12, 16, 31, 74, 0, 24], ["-", 31, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["-", 0, 16, 31, 16, 12, 16, 31, 74, 0, 25], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 24], ["+", 12, 16, 12, 23, 0, 74, 39, 77, 39, 40], ["+", 31, 16, 12, 16, 12, 23, 0, 74, 0, 25]]
1
149
import java.util.*; import java.io.*; import java.math.*; public class Main { public static void process() throws IOException { long n = nl(); long x = nl(); long t = nl(); pn((int)Math.ceil((double)x / n) * t); } static long mod = (long)1e9 + 7l; static AnotherReader sc; static PrintWriter ou...
import java.util.*; import java.io.*; import java.math.*; public class Main { public static void process() throws IOException { long n = nl(); long x = nl(); long t = nl(); pn((int)Math.ceil((double)n / x) * t); } static long mod = (long)1e9 + 7l; static AnotherReader sc; static PrintWriter ou...
[["-", 51, 492, 3, 4, 0, 16, 31, 74, 51, 22], ["-", 31, 74, 51, 492, 3, 4, 0, 16, 17, 85], ["+", 31, 74, 51, 492, 3, 4, 0, 16, 17, 85], ["+", 31, 74, 51, 492, 3, 4, 0, 16, 12, 22]]
3
721
N,X,T = map(int,input().split()) if N <= X: print(T) else: if N%X == 0: print((N // X + 1) * T) else: print((N//X+1)*T)
N,X,T = map(int,input().split()) if N <= X: print(T) else: if N%X == 0: print((N // X) * T) else: print((N//X+1)*T)
[["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]]
5
62
N,X,T= list(map(int,input().split())) if N%T==0: ans = N/X*T else: ans = (N//X+1)*T print(int(ans))
N,X,T= list(map(int,input().split())) if N%X==0: ans = N/X*T else: ans = (N//X+1)*T print(int(ans))
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22]]
5
55
import math N, X, T = map(int, input().split()) count = N/X print(count) count = math.ceil(count) print(count * T)
import math N, X, T = map(int, input().split()) count = N/X #print(count) count = math.ceil(count) print(count * T)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
43
n,x,t = map(int,input().split()) if n % x == 0: print((n // x) * t + t) else: print((n // x) * t)
n,x,t = map(int,input().split()) if n % x != 0: print((n // x + 1) * t) else: print((n // x) * t)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 79], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72]]
5
49
#include <iostream> using namespace std; int main() { int n, x, t, batches; cin >> n >> x >> t; batches = n / x; if (n & x) batches++; cout << batches * t << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, x, t, batches; cin >> n >> x >> t; batches = n / x; if (n % x != 0) batches++; cout << batches * t << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 67], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
55
n, x, t = map(int,input().split()) res = 0 res = n // x * t if n % x != 0: res += t print(t)
n, x, t = map(int,input().split()) res = 0 res = n // x * t if n % x != 0: res += t print(res)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
42
#include <algorithm> #include <iomanip> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; #define PI 3.14159265358979 typedef long long ll; #define rep(i, n) for (int i = 0; i < n; i++) #include <set> int main(void) { f...
#include <algorithm> #include <iomanip> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; #define PI 3.14159265358979 typedef long long ll; #define rep(i, n) for (int i = 0; i < n; i++) #include <set> int main(void) { f...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
85
#include <bits/stdc++.h> typedef long long int ll; using namespace std; void solve() { int n, x, t; cin >> n >> x >> t; cout << (n + x) / x * t << "\n"; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }
#include <bits/stdc++.h> typedef long long int ll; using namespace std; void solve() { int n, x, t; cin >> n >> x >> t; cout << (n + x - 1) / x * t << "\n"; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }
[["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
76
#include <stdio.h> int main() { int a, b, c, ans = 0; scanf("%d %d %d", &a, &b, &c); for (int i = 1;; i++) { ans += c; if (b * i > a) { printf("%d\n", ans); return 0; } } return 0; }
#include <stdio.h> int main() { int a, b, c, ans = 0; scanf("%d %d %d", &a, &b, &c); for (int i = 1;; i++) { ans += c; if (b * i >= a) { printf("%d\n", ans); return 0; } } return 0; }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20]]
0
78
import math n,x,t = map(int,input().split()) print(math.ceil(n//x)*t)
import math n,x,t = map(int,input().split()) print(math.ceil(n/x)*t)
[["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 676], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 85]]
5
33
n,x,t = map(int,input().split()) if n%x == 0: print(t*n//x) else: print(t*n//x + t)
n,x,t = map(int,input().split()) if n%x == 0: print(t*(n//x)) else: print(t*(n//x)+t)
[["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25], ["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 25]]
5
45
N,X,T=map(int,input().split()) c=N//X+1 print(c*T)
N,X,T=map(int,input().split()) c=(N-1)//X+1 print(c*T)
[["+", 0, 662, 12, 657, 31, 657, 31, 23, 0, 24], ["+", 12, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["+", 12, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 662, 12, 657, 31, 657, 31, 23, 0, 25]]
5
31
n,x,t = map(int,input().split()) x = n/x if x%1 == 0: print(int(x)*t) else: print((int(n/x)+1)*t)
n,x,t = map(int,input().split()) x = n/x if x%1 == 0: print(int(x)*t) else: print((int(x)+1)*t)
[["-", 0, 657, 31, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 85]]
5
56
#!/usr/bin/env python3 def main(): N, X, T = map(int, input().split()) ans = (N // X) * T + (T if N % T != 0 else 0) print(ans) if __name__ == "__main__": main()
#!/usr/bin/env python3 def main(): N, X, T = map(int, input().split()) ans = (N // X) * T + (T if N % X != 0 else 0) print(ans) if __name__ == "__main__": main()
[["-", 12, 23, 0, 41, 0, 666, 0, 657, 12, 22], ["+", 12, 23, 0, 41, 0, 666, 0, 657, 12, 22]]
5
59
#include <bits/stdc++.h> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; cout << (N / X) * T + T << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; cout << (N - 1) / X * T + T << endl; }
[["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 16, 31, 23, 0, 25], ["-", 31, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
1
41
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c; cin >> a >> b >> c; long long x = a / b; if (a % b == 0) cout << c * x << endl; else cout << ((c + 1) * x) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c; cin >> a >> b >> c; long long x = a / b; if (a % b == 0) cout << c * x << endl; else cout << ((c) * (x + 1)) << endl; }
[["-", 12, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["-", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
1
67
N, X, T = map(int, input().split()) print(int(-(-N/X)*T))
N, X, T = map(int, input().split()) print(int(-(-N//X)*T))
[["-", 0, 657, 31, 664, 28, 23, 0, 657, 17, 85], ["+", 0, 657, 31, 664, 28, 23, 0, 657, 17, 676]]
5
33
#include <bits/stdc++.h> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; int time = T; while (N > 0) { N = N - X; time = time + T; } cout << time << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; int time = 0; while (N > 0) { N = N - X; time = time + T; } cout << time << endl; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
58
#include <iostream> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; int n = N % X == 0 ? N : N / X + 1; cout << n * T << endl; }
#include <iostream> using namespace std; int main() { int N, X, T; cin >> N >> X >> T; int n = N % X == 0 ? N / X : N / X + 1; cout << n * T << endl; }
[["+", 0, 43, 49, 50, 51, 41, 64, 16, 17, 85], ["+", 0, 43, 49, 50, 51, 41, 64, 16, 12, 22]]
1
52
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define fast \ ios_base::sync_with_stdio(false); \ cout.tie(NULL); \ cin.tie(...
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define fast \ ios_base::sync_with_stdio(false); \ cout.tie(NULL); \ cin.tie(...
[["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 40], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]]
1
178
#include <algorithm> #include <assert.h> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> ...
#include <algorithm> #include <assert.h> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> ...
[["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13]]
1
677
def main(): n, x, t = map(int, input().split()) times = n//x amari = n%x minutes = times * t if amari ==0: return print(minutes) else: return print(minutes + 1) main()
def main(): n, x, t = map(int, input().split()) times = n//x amari = n%x minutes = times * t if amari ==0: return print(minutes) else: return print(minutes + t) main()
[["-", 0, 37, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 37, 0, 652, 3, 4, 0, 657, 12, 22]]
5
60
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N, X, T; cin >> N >> X >> T; cout << T * (N + X - 1) / X << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N, X, T; cin >> N >> X >> T; cout << ((N + X - 1) / X) * T << endl; }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
49
#define _USE_MATH_DEFINES #include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ...
#define _USE_MATH_DEFINES #include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
131
package main import ( "fmt" "math" ) func main() { var n, x, t float64 fmt.Scan(&n, &x, &t) fmt.Println(math.Ceil(n/x) * t) }
package main import ( "fmt" "math" ) func main() { var n, x, t float64 fmt.Scan(&n, &x, &t) fmt.Println(int(math.Ceil(n/x) * t)) }
[["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]]
7
60
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define IOS \ ios ::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define IOS \ ios ::sync_with_stdio(false); \ cin.tie(0); ...
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 49, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 49, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
455
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define pii pair<int, int> #define pb push_back #define fi first #define se second #define UP(a, b, c) for (ll(a) = (b); (a) < (c); (a)++) #define UU(a, b, c) for (ll(a) = (b); (a) <= (c); (a)++) #define DN(a, b, c) for ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define pii pair<int, int> #define pb push_back #define fi first #define se second #define UP(a, b, c) for (ll(a) = (b); (a) < (c); (a)++) #define UU(a, b, c) for (ll(a) = (b); (a) <= (c); (a)++) #define DN(a, b, c) for ...
[["-", 0, 16, 12, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 12, 22]]
1
179
// #include <bits/stdc++.h> using namespace std; #define PB push_back #define f first #define s second #define what_is(x) cerr << #x << " is " << x << endl; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; const int INF = 1000000007; const ll MOD = 1000000007; const int N = 1000005; int...
// #include <bits/stdc++.h> using namespace std; #define PB push_back #define f first #define s second #define what_is(x) cerr << #x << " is " << x << endl; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; const int INF = 1000000007; const ll MOD = 1000000007; const int N = 1000005; int...
[["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]]
1
115
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
[["-", 12, 23, 0, 41, 15, 16, 31, 16, 12, 22], ["+", 12, 23, 0, 41, 15, 16, 31, 16, 12, 22]]
1
220
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n, x, t; cin >> n >> x >> t; cout << ceil((n * 1.0) / x) * t << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n, x, t; cin >> n >> x >> t; cout << (int)(ceil((n * 1.0) / x) * t) << '\n'; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 25], ["+", 0, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 51, 23, 0, 25]]
1
64
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode...
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode...
[["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 676], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 85]]
5
694
#include <bits/stdc++.h> using namespace std; #define int long long #define rapido \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.ti...
#include <bits/stdc++.h> using namespace std; #define int long long #define rapido \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.ti...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
90
#include <bits/stdc++.h> using namespace std; #define ll long long #define deb(x) cerr << #x << ":" << x << "\n" #define all(x) x.begin(), x.end() #define sz(x) x.size() #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define deb(x) cerr << #x << ":" << x << "\n" #define all(x) x.begin(), x.end() #define sz(x) x.size() #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set ...
[["-", 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
125
/*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds;*/ #include <algorithm> #include <bits/stdc++.h> #include <ctype.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; #define pb push_back #define mp make_pair #define S second #def...
/*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds;*/ #include <algorithm> #include <bits/stdc++.h> #include <ctype.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; #define pb push_back #define mp make_pair #define S second #def...
[["-", 0, 14, 8, 9, 0, 1, 0, 191, 39, 78], ["-", 8, 9, 0, 1, 0, 191, 51, 83, 0, 45], ["-", 0, 1, 0, 191, 51, 83, 0, 22, 0, 46], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
270
a, b, c = map(int, input().split()) d = a // b if a % d != 0: d += 1 print(d * c)
a, b, c = map(int, input().split()) d = a // b if a % b != 0: d += 1 print(d * c)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22]]
5
39
#include <bits/stdc++.h> using namespace std; #define ll long long int int const mod = 1000000007; int main() { ll n, x, t; cin >> n >> x >> t; cout << ceil(n / float(x)) * t; }
#include <bits/stdc++.h> using namespace std; #define ll long long int int const mod = 1000000007; int main() { ll n, x, t; cin >> n >> x >> t; cout << int(ceil(n / float(x)) * t); }
[["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 40], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]]
1
50
// HOW YOU DOI'N........................JT // Could this code be more bad..........CB // I know...............................MG // Hii..................................RG // Noooooooo............................RG // I wish I could but I don't want to...PB // That's what she said.................MS #include <bits/st...
// HOW YOU DOI'N........................JT // Could this code be more bad..........CB // I know...............................MG // Hii..................................RG // Noooooooo............................RG // I wish I could but I don't want to...PB // That's what she said.................MS #include <bits/st...
[["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["-", 75, 76, 0, 1, 0, 16, 12, 16, 17, 72], ["-", 75, 76, 0, 1, 0, 16, 12, 16, 12, 13]]
1
798
n,x,t=map(int,input().split()) r=math.ceil(n/x)*t print(r)
import math n,x,t=map(int,input().split()) r=math.ceil(n/x)*t print(r)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
34
#include <bits/stdc++.h> using ll = long long; using namespace std; #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) #define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i ...
#include <bits/stdc++.h> using ll = long long; using namespace std; #define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++) #define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i ...
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22]]
1
433
#include <algorithm> #include <bits/stdc++.h> #include <queue> using namespace std; int main() { int n, x, t; cin >> n >> x >> t; int m = n / x + 1; cout << m * t << endl; }
#include <algorithm> #include <bits/stdc++.h> #include <queue> using namespace std; int main() { int n, x, t; cin >> n >> x >> t; int m = (n - 1) / x + 1; cout << m * t << endl; }
[["+", 49, 50, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 31, 16, 31, 23, 0, 25]]
1
48
N = int(input()) if N / 9 == 0: print("Yes") else : print("No")
N=int(input()) if N%9 == 0: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109]]
5
29
N = input() n = len(N) x = 0 for i in range(n): x += i if x % 9 == 0: print('Yes') else: print('No')
N = input() n = len(N) x = 0 for i in range(n): x += int(N[i]) if x % 9 == 0: print('Yes') else: print('No')
[["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 73], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]]
5
46
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #define MAXN 500005 using namespace std; int main() { char c; long long ans = 0; while (scanf("%c", &c) != EOF && c != '\n') { ans += c - 'a' + 1; } if (ans % 9 == 0) printf("Yes\n"); else ...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #define MAXN 500005 using namespace std; int main() { char c; long long ans = 0; while (scanf("%c", &c) != EOF && c != '\n') { ans += c - '0'; } if (ans % 9 == 0) printf("Yes\n"); else p...
[["-", 0, 11, 12, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
92
V = input() s = 0 for c in V: n = int(c) s = s + n if s%9 == 0: print("yes") else: print("no")
V = input() s = 0 for c in V: n = int(c) s = s + n if s%9 == 0: 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
45
N = str(input()) a = [] for n in range(N): a.append(int(N[n])) if sum(a) % 9 == 0: print('Yes') else: print('No')
N = str(input()) a = [] for n in range(len(N)): a.append(int(N[n])) if sum(a) % 9 == 0: print('Yes') else: print('No')
[["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
56
#include <bits/stdc++.h> using namespace std; #define ll long long char s[200010]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> s; int len = strlen(s); int sum = 0; for (int i = 0; i < len; i++) sum += s[i]; if (sum % 9 == 0) { cout << "Yes"; } else { cout << "No"; ...
#include <bits/stdc++.h> using namespace std; #define ll long long char s[200010]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> s; int len = strlen(s); int sum = 0; for (int i = 0; i < len; i++) sum += s[i] - '0'; if (sum % 9 == 0) { cout << "Yes"; } else { cout << "N...
[["+", 0, 7, 8, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 125]]
1
98
n = int(input()) if sum(n)%9 ==0: print("Yes") else: print("No")
n = int(input()) if n%9 ==0: print("Yes") else: print("No")
[["-", 0, 57, 15, 666, 0, 657, 31, 652, 63, 22], ["-", 15, 666, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25]]
5
32
n = list(map(int, input().split())) result = "YES" if sum(n) % 9 == 0 else "NO" print(result)
n = list(map(int, input().split())) result = "Yes" if sum(n) % 9 == 0 else "No" print(result)
[["-", 0, 1, 0, 662, 12, 41, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 41, 0, 557, 0, 6]]
5
39
#include <bits/stdc++.h> using namespace std; // TYPEDEF // ---------------------------------------- typedef long long ll; typedef long double ld; typedef pair<ll, ll> Pair; typedef vector<ll> vll; typedef vector<vector<ll>> Graph; typedef vector<string> vs; typedef vector<pair<ll, ll>> Pll; typedef queue<ll> qll; //...
#include <bits/stdc++.h> using namespace std; // TYPEDEF // ---------------------------------------- typedef long long ll; typedef long double ld; typedef pair<ll, ll> Pair; typedef vector<ll> vll; typedef vector<vector<ll>> Graph; typedef vector<string> vs; typedef vector<pair<ll, ll>> Pll; typedef queue<ll> qll; //...
[["-", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 11, 12, 2, 3, 4, 0, 66, 17, 67], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]]
1
704
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; int N = n.size(); int sum = 0; for (int i = 0; i < N; i++) { int num = (int)n.at(i); sum += num; } if (sum % 9 == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; int N = n.size(); int sum = 0; for (int i = 0; i < N; i++) { int num = (int)n.at(i) - 48; sum += num; } if (sum % 9 == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
94
n = list(map(int,input().split())) if sum(n)/9 == sum(n)//9: print("Yes") else: print("No")
n = list(map(int,input())) if sum(n)/9 == sum(n)//9: print("Yes") else: print("No")
[["-", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
46
#if __has_include("debug.h") #include "debug.h" #else #include <bits/stdc++.h> using namespace std; #define d(...) 2; #endif #define int long long int #define fast \ ios_base::sync_with_stdio(0); \ cin...
#if __has_include("debug.h") #include "debug.h" #else #include <bits/stdc++.h> using namespace std; #define d(...) 2; #endif #define int long long int #define fast \ ios_base::sync_with_stdio(0); \ cin...
[["-", 0, 11, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 11, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
200
s = int(input()) q = [] for i in s: q.append(i) if sum(q)%9 == 0: print('Yes') else:print('No')
s = input() q = [] for i in s: q.append(int(i)) if sum(q)%9 == 0: print('Yes') else:print('No')
[["-", 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], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
47
#include <bits/stdc++.h> #include <iostream> #define rep(i, n) for (int i = 0; i < (int)n; i++) using namespace std; typedef long long int ll; int main() { char *s; scanf("%s", s); ll sum = 0; rep(i, strlen(s)) sum += s[i] - '0'; if (sum % 9 == 0) printf("Yes"); else printf("No"); }
#include <bits/stdc++.h> #include <iostream> #define rep(i, n) for (int i = 0; i < (int)n; i++) using namespace std; typedef long long int ll; int main() { char s[200000]; scanf("%s", s); ll sum = 0; rep(i, strlen(s)) sum += s[i] - '0'; if (sum % 9 == 0) printf("Yes"); else printf("No"); }
[["-", 0, 14, 8, 9, 0, 43, 49, 84, 0, 48], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73]]
1
89
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int sum = 0; for (int i = 0; i < s.size(); i++) { sum += (int)s[i]; } if (sum % 9 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int sum = 0; for (int i = 0; i < s.size(); i++) { sum += (int)s[i] - 48; } if (sum % 9 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
86
N = input() check = 0 for i in N: check += i if check % 9 == 0: print("Yes") else: print("No")
N = input() check = 0 for i in N: check += int(i) if check % 9 == 0: print("Yes") else: print("No")
[["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]]
5
37
#include <bits/stdc++.h> using namespace std; int main() { string s; int n = 0; cin >> s; while (!s.empty()) { n += int(s.back()); n = n % 9; s.pop_back(); } if (n == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int n = 0; cin >> s; while (!s.empty()) { n += int(s.back()) - int('0'); n = n % 9; s.pop_back(); } if (n == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 2, 63, 40], ["+", 0, 11, 12, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 16, 12, 2, 3, 4, 0, 103, 0, 104], ["+", 12, 16, 12, 2, 3, 4, 0, 103, 0, 125], ["+", 0, 11, 12, 16, 12, 2, 3, 4, 0, 25]]
1
84
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long long sum = 0; int n = s.size(); for (int i = 0; i < n; ++i) sum += s[i] - '0'; if (sum % 9 == 0) cout << "Yes"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long long sum = 0; int n = s.size(); for (int i = 0; i < n; ++i) sum += s[i] - '0'; if (sum % 9 == 0) cout << "Yes"; else cout << "No"; }
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
80
n = int(input()) if n % 9 == 0 and n >= 9: print('Yes') else: print('No')
n = int(input()) if n % 9 == 0: print('Yes') else: print('No')
[["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]]
5
33
#include <stdio.h> #include <string.h> int main() { char s[100000]; int i, j, p = 0, a, k; gets(s); a = strlen(s); for (i = 0; i < a; i++) { p = p + (s[i] - s[0]); p = p % 9; } if (p % 9 == 0) printf("Yes\n"); else printf("No\n"); return 0; }
#include <stdio.h> #include <string.h> int main() { char s[1000000]; int i, j, p = 0, a, k; gets(s); a = strlen(s); for (i = 0; i < a; i++) { p = p + (s[i] - '0'); p = p % 9; } if (p % 9 == 0) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 12, 16, 12, 23, 0, 16, 12, 69, 28, 22], ["-", 12, 16, 12, 23, 0, 16, 12, 69, 0, 70], ["+", 12, 16, 12, 23, 0, 16, 12, 103, 0, 104], ["-", 12, 16, 12, 23, 0, 16, 12, 69, 0, 73]]
0
106
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define w(t) \ int t; \ cin >> t; ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define w(t) \ int t; \ cin >> t; ...
[["-", 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
212
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long long int sm = 0; for (int i = 0; i < s.length(); i++) sm += s[i] - '0'; (sm % 9 == 0) ? cout << "YES" << endl : cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long long int sm = 0; for (int i = 0; i < s.length(); i++) sm += s[i] - '0'; (sm % 9 == 0) ? cout << "Yes" << endl : cout << "No" << endl; }
[["-", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6]]
1
79
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { string n; cin >> n; ll sum = 0, m, i, j; for (i = 0; i < n.length(); i++) { sum += n[i] - 48; } if (sum % 9 == 0) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { string n; cin >> n; ll sum = 0, m, i, j; for (i = 0; i < n.length(); i++) { sum += n[i] - 48; } if (sum % 9 == 0) cout << "Yes" << endl; else cout << "No" << 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
86
N = input() num = 0 for n in N: num = num + int(n) print(num) print("Yes") if(num % 9 == 0) else print("No")
N = input() num = 0 for n in N: num = num + int(n) print("Yes") if(num % 9 == 0) else print("No")
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 656, 0, 1, 0, 41, 0, 652, 63, 22], ["-", 0, 1, 0, 41, 0, 652, 3, 4, 0, 24]]
5
46
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(vec) vec.begin(), vec.end() #define END return 0 typedef int64_t ll; const int mod7 = 1e9 + 7; const int mod9 = 1e9 + 9; const int inf = 1 << 30; const ll INF = 1LL << 60; template <typename T> T gcd(T a, T b)...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(vec) vec.begin(), vec.end() #define END return 0 typedef int64_t ll; const int mod7 = 1e9 + 7; const int mod9 = 1e9 + 9; const int inf = 1 << 30; const ll INF = 1LL << 60; template <typename T> T gcd(T a, T b)...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 64, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["-", 64, 1, 0, 16, 31, 16, 12, 103, 0, 125], ["-", 0, 16, 31, 16, 12, 103, 0, 42, 0, 22], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-...
1
303
# https://atcoder.jp/contests/abc176/tasks/abc176_b n = int(input()) if n % 9 == 0: print('YES') else: print('NO')
# https://atcoder.jp/contests/abc176/tasks/abc176_b n = int(input()) if n % 9 == 0: 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
30
n=int(input()) if n%9: print("Yes") else: print("No")
n=int(input()) if n%9==0: print("Yes") else: print("No")
[["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]]
5
27
print('YES' if int(input())%9==0 else 'NO')
print('Yes' if int(input())%9==0 else 'No')
[["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
21
#include <bits/stdc++.h> using namespace std; int main() { string N; cin >> N; int D = N.size(); int sum = 0; for (int i = 9; i < D; i++) { sum += N[i] - '0'; } if (sum % 9 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string N; cin >> N; int D = N.size(); int sum = 0; for (int i = 0; i < D; i++) { sum += N[i] - '0'; } if (sum % 9 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
89
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); string s; cin >> s; ll x = 0LL; for (auto i : s) { ll d = i - '0'; x += d; } if (x % 9LL == 0) puts("YES"); else puts("NO"); }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); string s; cin >> s; ll x = 0LL; for (auto i : s) { ll d = i - '0'; x += d; } if (x % 9LL == 0) puts("Yes"); else puts("No"); }
[["-", 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
93
// CPP program to demonstrate use of std::map #include <iostream> #include <stack> #include <stdio.h> #include <string.h> #include <string> using namespace std; int main() { string N; cin >> N; long long int sum = 0; for (int i = 0; i < N.size(); i++) { sum += N[0] - '0'; } if (sum % 9 == 0) cout <<...
// CPP program to demonstrate use of std::map #include <iostream> #include <stack> #include <stdio.h> #include <string.h> #include <string> using namespace std; int main() { string N; cin >> N; long long int sum = 0; for (int i = 0; i < N.size(); i++) { sum += N[i] - '0'; } if (sum % 9 == 0) cout <<...
[["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]]
1
94
#include <bits/stdc++.h> using namespace std; int main() { string str; long long i, size, count = 0; cin >> str; size = str.size(); for (i = 0; i < size; i++) { count += str.at(i); } if (count % 9 == 0) cout << "Yes"; else cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { string str; long long i, size, count = 0; cin >> str; size = str.size(); for (i = 0; i < size; i++) { count += str.at(i) - '0'; } if (count % 9 == 0) cout << "Yes"; else cout << "No"; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]]
1
82
#include <bits/stdc++.h> #define sio() \ ; \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fio() ...
#include <bits/stdc++.h> #define sio() \ ; \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fio() ...
[["-", 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
93
#include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define ld long double #define mod 1000000007 #define FT() \ int t; \ scanf("%d", &t); ...
#include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define ld long double #define mod 1000000007 #define FT() \ int t; \ scanf("%d", &t); ...
[["-", 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
189
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; long long sum = 0; for (auto x : n) sum = sum + x - '0'; if (sum % 9 == 0) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; long long sum = 0; for (auto x : n) sum = sum + x - '0'; if (sum % 9 == 0) cout << "Yes" << endl; else cout << "No" << 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
67
l = list(map(int, input())) s = 0 for i in l: s += i if s % 9 == 0: print('yes') else: print('no')
l = list(map(int, input())) s = 0 for i in l: s += i if s % 9 == 0: 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
45
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = int(a); i < int(n); i++) #define FAST \ ios::sync_with_stdio(0); \ cin.tie(0); #define OUT freopen("output.txt", "w", stdout) #define IN fr...
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = int(a); i < int(n); i++) #define FAST \ ios::sync_with_stdio(0); \ cin.tie(0); #define OUT freopen("output.txt", "w", stdout) #define IN fr...
[["+", 0, 11, 12, 16, 31, 2, 3, 4, 0, 25], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["-", 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
176
#include <iostream> using namespace std; int main() { string S; cin >> S; int t = 0; for (int i = 0; i < S.length(); i++) t += S[i]; if (t % 9) cout << "No" << endl; else cout << "Yes" << endl; }
#include <iostream> using namespace std; int main() { string S; cin >> S; int t = 0; for (int i = 0; i < S.size(); i++) t += S[i] - '0'; if (t % 9) cout << "No" << endl; else cout << "Yes" << endl; }
[["-", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 8, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 125]]
1
72
nstr=input() keta=len(nstr) wa=0 for i in range(keta): wa+=nstr[i] ans="No" if wa%9==0: ans="Yes" print(ans)
nstr=input() keta=len(nstr) wa=0 for i in range(keta): wa+=int(nstr[i]) ans="No" if wa%9==0: ans="Yes" print(ans)
[["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]]
5
49
#include <iostream> #include <string> using namespace std; typedef long long ll; int main() { string n; cin >> n; int res = 0; for (int i = 0; i < n.size(); i++) { res += int(n[i] - '0'); } if (res % 9 == 0) cout << "YES"; else cout << "NO"; return 0; }
#include <iostream> #include <string> using namespace std; typedef long long ll; int main() { string n; cin >> n; int res = 0; for (int i = 0; i < (int)n.size(); i++) { res += int(n[i] - '0'); } if (res % 9 == 0) cout << "Yes"; else cout << "No"; return 0; }
[["+", 8, 9, 0, 7, 15, 16, 12, 74, 0, 24], ["+", 0, 7, 15, 16, 12, 74, 39, 77, 39, 40], ["+", 8, 9, 0, 7, 15, 16, 12, 74, 0, 25], ["-", 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
89
/* AUTHOR: julianferres, sáb 29 ago 2020 00:47:22 -03 */ #include <bits/stdc++.h> using namespace std; // DEBUGGER #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof...
/* AUTHOR: julianferres, sáb 29 ago 2020 00:47:22 -03 */ #include <bits/stdc++.h> using namespace std; // DEBUGGER #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof...
[["-", 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
463
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main(void) { string n; cin >> n; ll a = 0; rep(i, n.size()) { a += (int)n[i]; } if (a == 0) { cout << "Yes" << endl; } else if (a % 9 == 0) { cout << "Yes" << endl; } else {...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main(void) { string n; cin >> n; ll a = 0; rep(i, n.size()) { a += n[i] - '0'; } if (a == 0) { cout << "Yes" << endl; } else if (a % 9 == 0) { cout << "Yes" << endl; } else ...
[["-", 0, 9, 0, 1, 0, 11, 12, 74, 0, 24], ["-", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["-", 0, 9, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]]
1
107
import java.io.IOException; import java.io.InputStream; import java.util.*; public class Main { public Main() { FastScanner scanner = new FastScanner(); String N = scanner.next(); int sum = 0; for (int i = 0; i < N.length(); i++) { sum += Integer.valueOf(N.charAt(i) - '0') % 9; } if ...
import java.io.IOException; import java.io.InputStream; import java.util.*; public class Main { public Main() { FastScanner scanner = new FastScanner(); String N = scanner.next(); int sum = 0; for (int i = 0; i < N.length(); i++) { sum += Integer.valueOf(N.charAt(i) - '0'); } if (sum...
[["-", 8, 196, 0, 1, 0, 11, 12, 16, 17, 109], ["-", 8, 196, 0, 1, 0, 11, 12, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]]
3
579
line = input() length = len(line) sum = 0 for i in range(length): sum += int(line[i]) if sum % 9 == 0: print("yes") else: print("no")
line = input() length = len(line) sum = 0 for i in range(length): sum += int(line[i]) if sum % 9 == 0: 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
52
#include <cstring> #include <iostream> using namespace std; char s[200010]; int main() { cin >> s; int len = strlen(s); int sum = 0; for (int i = 0; i < len; i++) sum += s[i] - '0'; if (sum % 9 != 0) { cout << "Yes"; } else { cout << "No"; } }
#include <cstring> #include <iostream> using namespace std; char s[200010]; int main() { cin >> s; int len = strlen(s); int sum = 0; for (int i = 0; i < len; i++) sum += (s[i] - '0'); if (sum % 9 == 0) { cout << "Yes"; } else { cout << "No"; } }
[["+", 0, 7, 8, 1, 0, 11, 12, 23, 0, 24], ["+", 0, 7, 8, 1, 0, 11, 12, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
87
n,x,t=map(int,input().split()) if n%x==0: print(n//x*t) else: print(n//x*t+1)
n,x,t=map(int,input().split()) if n%x==0: print((n//x)*t) else: print((n//x)*t+t)
[["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
45
#include <bits/stdc++.h> using namespace std; int main(void) { int N, X, T; cin >> N >> X >> T; long long result = T * ceil(N / X); cout << result << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int N, X, T; cin >> N >> X >> T; long long result = T * ceil((double)N / (double)X); cout << result << endl; return 0; }
[["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["+", 12, 2, 3, 4, 0, 16, 12, 74, 0, 24], ["+", 3, 4, 0, 16, 12, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 12, 74, 0, 25]]
1
50
n,x,t=map(int,input().split()) print(t*(n+(x-1)//t))
n,x,t=map(int,input().split()) print(t*((n+x-1)//x))
[["+", 0, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["-", 12, 23, 0, 657, 12, 657, 31, 23, 0, 24], ["-", 0, 657, 12, 23, 0, 657, 12, 657, 12, 22], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 22]]
5
34
n,x,t = map(int, input().split()) cnt = (n//x) + 1 time = t * cnt print(time)
n,x,t = map(int, input().split()) cnt = ((n-1)//x) + 1 time = t * cnt print(time)
[["+", 12, 657, 31, 23, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 31, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 657, 31, 23, 0, 657, 31, 23, 0, 25]]
5
36
N, X, T = map(int, input().split()) count = 0 time = 0 while N >= count: count += X time += T print(time)
N, X, T = map(int, input().split()) count = 0 time = 0 while N > count: count += X time += T print(time)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]]
5
39
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define ll long long ...
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define ll long long ...
[["-", 8, 9, 0, 57, 64, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22]]
1
132
n, x, t = map(int, input().split()) ans = 0 ans += n // x * t if n % t > 0: ans += t print(ans)
n, x, t = map(int, input().split()) ans = 0 ans += n // x * t if n % x > 0: ans += t print(ans)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22]]
5
42
n, x, t = map(int, input()) ans = n//x if n%x != 0: ans += 1 print(int(ans)*t)
n, x, t = map(int, input().split()) ans = n//x if n%x != 0: ans += 1 print(int(ans)*t)
[["+", 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
38
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string n; int sum = 0; cin >> n; for (int i = 0; i < n.length(); i++) { sum += n.at(i); } if (sum % 9 == 0) cout << "Yes\n"; else cout << "No\n"; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string n; int sum = 0; cin >> n; for (int i = 0; i < n.length(); i++) { sum += n.at(i) - 48; } if (sum % 9 == 0) cout << "Yes\n"; else cout << "No\n"; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
80