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; #define fi first #define se second #define pb push_back #define eb emplace_back #define mkp make_pair #define SZ(x) ((int)(x).size()) #define MEM(x, a) memset(x, a, sizeof(x)) #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; ...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define eb emplace_back #define mkp make_pair #define SZ(x) ((int)(x).size()) #define MEM(x, a) memset(x, a, sizeof(x)) #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
261
#include <bits/stdc++.h> using namespace std; #define Boost ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define all(cont) cont.begin(), cont.end() #define rall(cont) cont.rbegin(), cont.rend() #define foreach(cont) for (auto &value : cont) #define show(val) cout << #val << " -> " << val << endl #define ...
#include <bits/stdc++.h> using namespace std; #define Boost ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define all(cont) cont.begin(), cont.end() #define rall(cont) cont.rbegin(), cont.rend() #define foreach(cont) for (auto &value : cont) #define show(val) cout << #val << " -> " << val << endl #define ...
[["-", 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
188
//#pragma GCC optimize("O2,no-stack-protector,unroll-loops,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <thread> //#include <boost/multiprecision/cpp_int.hpp> #include <ext/pb_ds/assoc_container.hpp> #i...
//#pragma GCC optimize("O2,no-stack-protector,unroll-loops,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <thread> //#include <boost/multiprecision/cpp_int.hpp> #include <ext/pb_ds/assoc_container.hpp> #i...
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
1
1,794
#include <algorithm> #include <bits/stdc++.h> #include <iostream> using namespace std; /*---------------------DEBUGGING--------------------------------------------*/ void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } vo...
#include <algorithm> #include <bits/stdc++.h> #include <iostream> using namespace std; /*---------------------DEBUGGING--------------------------------------------*/ void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } vo...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
529
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string s; cin >> s; bool can = false; for (auto x : s) { if (x == '7') { can = true; break; } } cout << (can ? "YES" : "NO"); }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string s; cin >> s; bool can = false; for (auto x : s) { if (x == '7') { can = true; break; } } cout << (can ? "Yes" : "No"); }
[["-", 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
66
#include <algorithm> #include <cmath> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using...
#include <algorithm> #include <cmath> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> using...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
119
#include <bits/stdc++.h> #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef unsigned long long llu; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; typedef pair<int, ll> pil; typedef pair<s...
#include <bits/stdc++.h> #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef unsigned long long llu; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; typedef pair<int, ll> pil; typedef pair<s...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
269
n = list(input()) print(n) if '7' in n: print('Yes') else: print('No')
n = list(input()) if '7' in n: print('Yes') else: print('No')
[["-", 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
33
#JMD #Nagendra Jha-4096 import sys import math #import fractions #import numpy ###File Operations### fileoperation=1 if(fileoperation): orig_stdout = sys.stdout orig_stdin = sys.stdin inputfile = open('W:/Competitive Programming/input.txt', 'r') outputfile = open('W:/Competitive Programming/output...
#JMD #Nagendra Jha-4096 import sys import math #import fractions #import numpy ###File Operations### fileoperation=0 if(fileoperation): orig_stdout = sys.stdout orig_stdin = sys.stdin inputfile = open('W:/Competitive Programming/input.txt', 'r') outputfile = open('W:/Competitive Programming/output...
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
159
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define ll long long using namespace std; int main() { ll n; cin >> n; while (n > 0) { ll num = n % 10; if (n...
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define ll long long using namespace std; int main() { ll n; cin >> n; while (n > 0) { ll num = n % 10; if (n...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
90
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (s[i] == '7') { cout << "YES"; return 0; } } cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (s[i] == '7') { cout << "Yes"; return 0; } } cout << "No"; return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
94
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; while (n != 0) { if (n % 10 == 7) { cout << "YES" << endl; return 0; } n = n / 10; } cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; while (n != 0) { if (n % 10 == 7) { cout << "Yes" << endl; return 0; } n = n / 10; } cout << "No" << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
65
#include <bits/stdc++.h> #include <climits> using namespace std; #define debug(x, y) \ cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl #define watch(x) cout << (#x) << " is " << (x) << endl #define fast ios_base::sync_with_stdio(false) #d...
#include <bits/stdc++.h> #include <climits> using namespace std; #define debug(x, y) \ cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl #define watch(x) cout << (#x) << " is " << (x) << endl #define fast ios_base::sync_with_stdio(false) #d...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
205
#include <bits/stdc++.h> #define int long long int #define ld long double #define getFaster \ ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define rep(i, init, n) for (int i = init; i < n; i++) #define rev(i, n, init) for (int i = n; i >=...
#include <bits/stdc++.h> #define int long long int #define ld long double #define getFaster \ ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define rep(i, init, n) for (int i = init; i < n; i++) #define rev(i, n, init) for (int i = n; i >=...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
179
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define pb push_back #define pi pair<ll, ll> #define vi vector<int> #define vpi vector<pi> #define IOS ios_base::sync_with_stdio(false), cin.tie(NULL) const int N = 100002; int main() { int n; cin >> n; int f = 0; while ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define pb push_back #define pi pair<ll, ll> #define vi vector<int> #define vpi vector<pi> #define IOS ios_base::sync_with_stdio(false), cin.tie(NULL) const int N = 100002; int main() { int n; cin >> n; int f = 0; while ...
[["-", 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
93
package main import "fmt" func main() { var n int fmt.Scan(&n) for i := 0; i < 3; i++ { if n%10 == 7 { fmt.Println("Yes") return } } fmt.Println("No") }
package main import "fmt" func main() { var n int fmt.Scan(&n) for i := 0; i < 3; i++ { if n%10 == 7 { fmt.Println("Yes") return } n /= 10 } fmt.Println("No") }
[["+", 0, 7, 8, 196, 0, 436, 31, 432, 0, 22], ["+", 8, 196, 0, 7, 8, 196, 0, 436, 17, 90], ["+", 0, 7, 8, 196, 0, 436, 12, 432, 0, 433], ["+", 0, 435, 8, 196, 0, 7, 8, 196, 0, 165]]
7
69
num = input() flag = False for i in range(num): if num[i] == '7': flag = True break if flag: print("Yes") else: print("No")
num = input() flag = False for i in range(len(num)): if num[i] == '7': flag = True break if flag: 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
47
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #define mm(a, x) memset(a, x, sizeof(a)) #define sync \ std::ios::sync_with_stdio(false); \ std::cin.tie(0) #define ll long long u...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #define mm(a, x) memset(a, x, sizeof(a)) #define sync \ std::ios::sync_with_stdio(false); \ std::cin.tie(0) #define ll long long u...
[["-", 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
94
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxS = 1e5 + 7; int main() { ll n; cin >> n; bool YES = false; while (n) { if ((n % 10) == 7) YES = true; n /= 10; } if (YES) cout << "YES" << "\n"; else cout << "NO" << "\n"; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxS = 1e5 + 7; int main() { ll n; cin >> n; bool YES = false; while (n) { if ((n % 10) == 7) YES = true; n /= 10; } if (YES) cout << "Yes" << "\n"; else cout << "No" << "\n"; }
[["-", 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
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; while (n > 0) { if (n % 10 == 7) { cout << "YES" << endl; return 0; } n = n / 10; } cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; while (n > 0) { if (n % 10 == 7) { cout << "Yes" << endl; return 0; } n = n / 10; } 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
70
#include <bits/stdc++.h> using namespace std; int main() { int n, r; cin >> n; bool ok = false; while (n > 0) { r = n % 10; if (r == 7) { ok = true; break; } n /= 10; } if (ok) cout << "Yes\n"; else cout << "NO\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, r; cin >> n; bool ok = false; while (n > 0) { r = n % 10; if (r == 7) { ok = true; break; } n /= 10; } if (ok) cout << "Yes\n"; else cout << "No\n"; return 0; }
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
80
N = input() for n in N: if n == '7': ans = 'Yes' else: ans = 'No' print(ans)
N = input() for n in N: if n == '7': ans = 'Yes' break else: ans = 'No' print(ans)
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
33
from sys import stdin import math import fractions n = stdin.readline().rstrip() if n in '7': print('Yes') else: print('No')
from sys import stdin import math import fractions n = stdin.readline().rstrip() if '7' in n: print('Yes') else: print('No')
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 267], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 267], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
40
#include <iostream> using namespace std; int main() { long long x; cin >> x; while (x != 0) { if (x % 10 == 7) { cout << "YES"; return 0; } x = x / 10; } cout << "NO"; return 0; }
#include <iostream> using namespace std; int main() { long long x; cin >> x; while (x != 0) { if (x % 10 == 7) { cout << "Yes"; return 0; } x = x / 10; } cout << "No"; return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
62
N = list(map(int, input())) cnt = 0 for i in N: if i=='7': cnt += 1 if cnt==0: print('No') else: print('Yes')
N = list(map(int, input())) cnt = 0 for i in N: if i==7: cnt += 1 if cnt==0: print('No') else: print('Yes')
[["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 654], ["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 655]]
5
50
/* * Matheus Oliveira * 08:40:36 12/04/2020 * a.cpp */ #include <bits/stdc++.h> using namespace std; #define EPS #define INF #define MAXN #define ff first #define ss second #define pb push_back #define mp make_pair #define eb emplace_back #define sc(x) scanf("%d", &x); #define sc2(x, y) scanf("%d %d", &x, &y); #d...
/* * Matheus Oliveira * 08:40:36 12/04/2020 * a.cpp */ #include <bits/stdc++.h> using namespace std; #define EPS #define INF #define MAXN #define ff first #define ss second #define pb push_back #define mp make_pair #define eb emplace_back #define sc(x) scanf("%d", &x); #define sc2(x, y) scanf("%d %d", &x, &y); #d...
[["-", 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
172
// verma_ankit484 #include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #define int long long #define IOS \ ios::sync_with_stdio(0); \ cin.tie...
// verma_ankit484 #include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> #define int long long #define IOS \ ios::sync_with_stdio(0); \ cin.tie...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
132
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define PI acos(-1.0) #define sq(n...
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define PI acos(-1.0) #define sq(n...
[["-", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6]]
1
86
#!/usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop from bisect import bisect_left, bisect_right import sys, random, itertools, math sys.setrecursionlimit(10**5) input = sys.stdin.readline sqrt = math.sqrt def LI(): return list(map(int, input().split())) def LF(): return...
#!/usr/bin/env python3 from collections import defaultdict,deque from heapq import heappush, heappop from bisect import bisect_left, bisect_right import sys, random, itertools, math sys.setrecursionlimit(10**5) input = sys.stdin.readline sqrt = math.sqrt def LI(): return list(map(int, input().split())) def LF(): return...
[["-", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22]]
5
356
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { string s; cin >> s; ll d = 0; for (auto x : s) { if (x == '7') { d = 1; break; } } if (d) cout << "No\n"; if (!d) cout << "Yes\n"; }
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { string s; cin >> s; ll d = 0; for (auto x : s) { if (x == '7') { d = 1; break; } } if (!d) cout << "No\n"; if (d) cout << "Yes\n"; }
[["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111], ["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]]
1
78
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define mp make_pair #define N 200005 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int val = 0; while (n > 0) { if ((n % 10) == 7) val = 1; n = n...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define mp make_pair #define N 200005 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int val = 0; while (n > 0) { if ((n % 10) == 7) val = 1; n = n...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
112
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string...
[["-", 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
792
#include <bits/stdc++.h> using namespace std; // FILE *fi=freopen("1.txt","r",stdin); string s; int main() { cin >> s; for (auto c : s) { { if (c == '7') { cout << "YES"; return 0; } } } cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; // FILE *fi=freopen("1.txt","r",stdin); string s; int main() { cin >> s; for (auto c : s) { if (c == '7') { cout << "Yes"; return 0; } } cout << "No"; return 0; }
[["-", 8, 9, 0, 338, 8, 9, 0, 9, 0, 45], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 9, 0, 57, 64, 9, 0, 46], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
59
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef int...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef int...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
459
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
143
N = str(input()) a=1 for i in range(len(N)): if N[i]=='7': a=0 break if a==1: print('Yes') else: print('No')
N = str(input()) a=1 for i in range(len(N)): if N[i]=='7': a=0 break if a==0: print('Yes') else: print('No')
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]]
5
55
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.find("7") != string::npos) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.find("7") != string::npos) { 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
58
n = gets.chomp puts n.include("7") ? "Yes" : "No"
n = gets.chomp puts n.include?("7") ? "Yes" : "No"
[["-", 0, 652, 3, 4, 0, 754, 15, 652, 735, 22], ["+", 0, 652, 3, 4, 0, 754, 15, 652, 735, 22]]
4
22
N = list(input()) if N in '7': print('Yes') else: print('No')
N = list(input()) if '7' in N: print('Yes') else: print('No')
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 267], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 267], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]]
5
29
a = list(input()) if(a.count('7') > 0): print("YES") else: print("NO")
a = list(input()) if(a.count('7') > 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
36
import java.io.*; import java.util.*; public class Main { private void solve() throws IOException { int n = nextInt(); while (n > 0) { if (n % 10 == 7) { out.println("YES"); return; } n = n / 10; } out.println("NO"); } ///////////////////////////////////////////...
import java.io.*; import java.util.*; public class Main { private void solve() throws IOException { int n = nextInt(); while (n > 0) { if (n % 10 == 7) { out.println("Yes"); return; } n = n / 10; } out.println("No"); } ///////////////////////////////////////////...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
274
from sys import stdin, stdout def main(): n=stdin.readline().rstrip() if '7' in n: print('YES') return print('NO') return main()
from sys import stdin, stdout def main(): n=stdin.readline().rstrip() if '7' in n: print('Yes') return print('No') return main()
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
46
#include <algorithm> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <memory> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <vector> #define x first #define y...
#include <algorithm> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <memory> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <vector> #define x first #define y...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
155
// Hail god Yato #include <bits/stdc++.h> using namespace std; #define add(x) accumulate(x) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define ff first #define ss second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define rep(i, a, b) for (int i = a; i ...
// Hail god Yato #include <bits/stdc++.h> using namespace std; #define add(x) accumulate(x) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define ff first #define ss second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define rep(i, a, b) for (int i = a; i ...
[["-", 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
194
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; // or pb_ds; using namespace std; #define ff first #define ss second #define pb push_back #define eb emplace_back #ifndef DEBUG // #def...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; // or pb_ds; using namespace std; #define ff first #define ss second #define pb push_back #define eb emplace_back #ifndef DEBUG // #def...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
304
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**7) from pprint import pprint as pp from pprint import pformat as pf #import pysnooper # @pysnooper.snoop() #TODO import math #from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder import bisect class Solver: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**7) from pprint import pprint as pp from pprint import pformat as pf #import pysnooper # @pysnooper.snoop() #TODO import math #from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder import bisect class Solver: ...
[["-", 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, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]]
5
868
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 500; const int M = 64; int n; int S[N], T[N]; ull U[N], V[N]; ull ans[N][N]; int mat[M][N][N]; int sr[N], sc[N]; int pt(int t, ull v, int k) { return (t << 1) | ((v & (1llu << k)) > 0 ? 1 : 0); } v...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 500; const int M = 64; int n; int S[N], T[N]; ull U[N], V[N]; ull ans[N][N]; int mat[M][N][N]; int sr[N], sc[N]; int pt(int t, ull v, int k) { return (t << 1) | ((v & (1llu << k)) ? 1 : 0); } void fi...
[["-", 0, 16, 12, 23, 0, 41, 15, 16, 17, 47], ["-", 0, 16, 12, 23, 0, 41, 15, 16, 12, 13], ["-", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 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
1,152
#include <iostream> #include <utility> #include <vector> #define rep(i) for (int i = 0; i != n; i += 1) using std::cin; using std::cout; using std::swap; using std::vector; using vi = vector<int>; template <class T> void transpose(int n, vector<vector<T>> &a) { rep(i) { for (int j = 0; j != i; j += 1) { ...
#include <iostream> #include <utility> #include <vector> #define rep(i) for (int i = 0; i != n; i += 1) using std::cin; using std::cout; using std::swap; using std::vector; using vi = vector<int>; template <class T> void transpose(int n, vector<vector<T>> &a) { rep(i) { for (int j = 0; j != i; j += 1) { ...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 17, 67], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]]
1
987
#pragma region Macros #pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define ld long double #define rep2(i, a, b) for (ll i = a; i <= b; ++i) #define rep(i, n) for (ll i = 0; i < n; i++) #define rep3(i, a, b) for (ll i = a; i >= b; i--) #define pii pair<int, int> #define pll pair<ll, ll> #defi...
#pragma region Macros #pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define ld long double #define rep2(i, a, b) for (ll i = a; i <= b; ++i) #define rep(i, n) for (ll i = 0; i < n; i++) #define rep3(i, a, b) for (ll i = a; i >= b; i--) #define pii pair<int, int> #define pll pair<ll, ll> #defi...
[["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
2,610
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define MOD2 998244353 #define INF (1 << 29) #define LINF (1LL << 60) #define EPS...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define MOD 1000000007 #define MOD2 998244353 #define INF (1 << 29) #define LINF (1LL << 60) #define EPS...
[["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
1,318
#include <bits/stdc++.h> #define INF 1e9 using namespace std; using ll = long long; int main(void) { int N; cin >> N; ll ans = 0; for (int i = 1; i < N; i++) { if ((i % 3 != 0) && (i % 5 != 0)) { ans += i; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define INF 1e9 using namespace std; using ll = long long; int main(void) { int N; cin >> N; ll ans = 0; for (int i = 1; i <= N; i++) { if ((i % 3 != 0) && (i % 5 != 0)) { ans += i; } } cout << ans << endl; return 0; }
[["-", 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; int main(void) { int n; cin >> n; long long res = 0; for (int i = 0; i < n; ++i) if (i % 3 > 0 && i % 5 > 0) res += i; cout << res; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int n; cin >> n; long long res = 0; for (int i = 1; i <= n; ++i) if (i % 3 > 0 && i % 5 > 0) res += i; cout << res; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
65
n = int(input()) answer = 0 # 和の格納用 for i in range(1, n + 1): if i % 3 == 0 or i % 5 == 0: continue else: answer += i
n = int(input()) answer = 0 # 和の格納用 for i in range(1, n + 1): if i % 3 == 0 or i % 5 == 0: continue else: answer += i print(answer)
[["+", 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 = gets.to_i ans = 0 for i in 1...N+1 do if i%3==0 or i%5==0 then ans += i end end puts ans
N = gets.to_i ans = 0 for i in 1...N+1 do if i%3!=0 and i%5!=0 then ans += i end end puts ans
[["-", 8, 170, 0, 121, 15, 738, 31, 738, 17, 60], ["+", 8, 170, 0, 121, 15, 738, 31, 738, 17, 79], ["-", 0, 88, 8, 170, 0, 121, 15, 738, 17, 354], ["+", 0, 88, 8, 170, 0, 121, 15, 738, 17, 355], ["-", 8, 170, 0, 121, 15, 738, 12, 738, 17, 60], ["+", 8, 170, 0, 121, 15, 738, 12, 738, 17, 79]]
4
37
#include <iostream> using namespace std; int main() { int n; cin >> n; long long ans = 0; for (int i = 0; i < n; i++) { int num = i; if (i % 3 == 0 || i % 5 == 0) { num = 0; } ans += num; } cout << ans << endl; }
#include <iostream> using namespace std; int main() { int n; cin >> n; long long ans = 0; for (int i = 0; i < n + 1; i++) { int num = i; if (i % 3 == 0 || i % 5 == 0) { num = 0; } ans += num; } cout << ans << endl; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
76
#include <iostream> using namespace std; int main() { int N; cin >> N; int ans = 0; for (int i = 1; i <= N; i++) { if ((i % 3) * (i % 5) != 0) { ans += i; } } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { long N; cin >> N; long ans = 0; for (long i = 1; i <= N; i++) { if ((i % 3) * (i % 5) != 0) { ans += i; } } cout << ans << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]]
1
71
#include <iostream> int main() { int n; std::cin >> n; long long sum = ((1 + n) * n) / 2; int c3 = n / 3; int c5 = n / 5; int c15 = n / 15; sum -= (((1LL + c3) * c3) / 2 * 3); sum -= (((1LL + c5) * c5) / 2 * 5); sum += (((1LL + c15) * c15) / 2 * 15); std::cout << sum << std::endl; return 0; }
#include <iostream> int main() { int n; std::cin >> n; long long sum = ((1LL + n) * n) / 2; int c3 = n / 3; int c5 = n / 5; int c15 = n / 15; sum -= (((1LL + c3) * c3) / 2 * 3); sum -= (((1LL + c5) * c5) / 2 * 5); sum += (((1LL + c15) * c15) / 2 * 15); std::cout << sum << std::endl; return 0; }
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 31, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 31, 13]]
1
121
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() using namespace std; typedef long long ll; template <class T> inline bool chmin(T...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() using namespace std; typedef long long ll; template <class T> inline bool chmin(T...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
177
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, ans = 0; cin >> n; for (ll i = 0; i < n; i++) if (i % 3 != 0 && i % 5 != 0) ans += i; cout << ans << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, ans = 0; cin >> n; for (ll i = 1; i <= n; i++) if (i % 3 != 0 && i % 5 != 0) ans += i; cout << ans << "\n"; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
72
#include <bits/stdc++.h> using namespace std; int main() { long long ans = 0; int n; cin >> n; for (int i = 0; i < n; i++) { if (i % 3 != 0 && i % 5 != 0) ans += i; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long ans = 0; int n; cin >> n; for (int i = 1; i <= n; i++) { if (i % 3 != 0 && i % 5 != 0) ans += i; } cout << ans << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
65
N = int(input()) l = [i for i in range(1, int(input()) + 1) if i % 3 != 0 and i % 5 != 0] s = sum(l) print(s)
N = int(input()) l = [i for i in range(1, N + 1) if i % 3 != 0 and i % 5 != 0] s = sum(l) print(s)
[["-", 12, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["-", 0, 657, 31, 652, 3, 4, 0, 652, 63, 22], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 31, 22]]
5
51
N = int(input()) A = 0 for i in range(1,N+1): if(i % 3 !=0) and (i % 5 !=0): A+=1 print(A)
N = int(input()) A = 0 for i in range(1, N+1): if (i % 3 != 0) and (i % 5 != 0): A += i print(A)
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 22]]
5
47
import math import sys import os from operator import mul sys.setrecursionlimit(10**7) def _S(): return sys.stdin.readline().rstrip() def I(): return int(_S()) def LS(): return list(_S().split()) def LI(): return list(map(int,LS())) if os.getenv("LOCAL"): inputFile = basename_without_ext = os.path.splitext(os.pa...
import math import sys import os from operator import mul sys.setrecursionlimit(10**7) def _S(): return sys.stdin.readline().rstrip() def I(): return int(_S()) def LS(): return list(_S().split()) def LI(): return list(map(int,LS())) if os.getenv("LOCAL"): inputFile = basename_without_ext = os.path.splitext(os.pa...
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
173
#include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <string> using namespace std; int arr[101] = {0}; int main() { long long int a, total = 0; cin >> a; for (int i = 1; i < a; i++) { if (i % 3 != 0 && i % 5 != 0) { total += i; } } cout << total; }
#include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <string> using namespace std; int arr[101] = {0}; int main() { long long int a, total = 0; cin >> a; for (int i = 1; i <= a; i++) { if (i % 3 != 0 && i % 5 != 0) { total += i; } } cout << total; }
[["-", 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; int main() { long long n; cin >> n; // input long long ans = 0; // main start for (int i = 0; i < n; i++) { if (i % 3 != 0 && i % 5 != 0) { ans += i; } } // main end cout << ans << endl; // output return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; // input long long ans = 0; // main start for (int i = 1; i <= n; i++) { if (i % 3 != 0 && i % 5 != 0) { ans += i; } } // main end cout << ans << endl; // output return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
75
n=int(input()) a=0 b=0 c=0 for i in range(1,n//3+1): a+=3*i for i in range(1,n//5+1): b+=5*i for i in range(1,n//15+1): c+=15*i print(1//2*n*(n+1)-(a+b-c))
n=int(input()) a=0 b=0 c=0 for i in range(1,n//3+1): a+=3*i for i in range(1,n//5+1): b+=5*i for i in range(1,n//15+1): c+=15*i print(int(1/2*n*(n+1)-(a+b-c)))
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 657, 31, 657, 31, 657, 31, 657, 17, 676], ["+", 0, 657, 31, 657, 31, 657, 31, 657, 17, 85], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]]
5
96
#include <iostream> using namespace std; int main() { long long int sum(0); long long int N; cin >> N; for (long long int i = 0; i < N; i++) { if (i % 3 != 0 && i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
#include <iostream> using namespace std; int main() { long long int sum(0); long long int N; cin >> N; for (long long int i = 1; i <= N; i++) { if (i % 3 != 0 && i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
74
total = [] N = int(input()) for i in range(1, N): if i % 3 == 0 and i % 5 == 0: pass elif i % 3 == 0: pass elif i % 5 == 0: pass else: total.append(i) print(sum(total))
total = [] N = int(input()) for i in range(1, N + 1): if i % 3 == 0 and i % 5 == 0: pass elif i % 3 == 0: pass elif i % 5 == 0: pass else: total.append(i) print(sum(total))
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
67
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll a, b; cin >> a; b = 0; for (ll i = 1; i <= a; i++) { if (a / 3 != 0 && a / 5 != 0) { b += i; } } cout << b << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll a, b; cin >> a; b = 0; for (ll i = 1; i <= a; i++) { if (i % 3 != 0 && i % 5 != 0) { b += i; } } cout << b << endl; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 85], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 109], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 17, 85], ["+", 15, 339, 51, 16, 12, 16,...
1
73
n = int(input()) ans = sum([i for i in range(n) if i % 3 != 0 and i % 5 != 0]) print(ans)
n = int(input()) ans = sum([i for i in range(n+1) if i % 3 != 0 and i % 5 != 0]) print(ans)
[["+", 0, 659, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 12, 612]]
5
39
//--------------------------------------------------------------- #include <bits/stdc++.h> using namespace std; #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdlib> #include <iostream> #include <math.h> #include <numeric> #include <sstream> //------------------...
//--------------------------------------------------------------- #include <bits/stdc++.h> using namespace std; #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdlib> #include <iostream> #include <math.h> #include <numeric> #include <sstream> //------------------...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 57, 64, 116, 0, 117], ["+", 0, 14, 8, 9, 0, 57, 64, 116, 0, 35]]
1
299
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> #define ll long long #define ull unsigned long long #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define yes cout << "Yes" << endl #define no cout << "No" << endl #define FOR(i, start, s...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> #define ll long long #define ull unsigned long long #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define yes cout << "Yes" << endl #define no cout << "No" << endl #define FOR(i, start, s...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
151
#include <bits/stdc++.h> using namespace std; using ll = long long; #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.t...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.t...
[["-", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
87
b=0 n=input() for i in range(1, int(n)): if i%3==0 and i%5==0: a="FizzBuzz" elif i%3==0: a="Fizz" elif i%5==0: a="Buzz" else: b=b+i print(b)
b=0 n=input() for i in range(1, int(n)+1): if i%3==0 and i%5==0: a="FizzBuzz" elif i%3==0: a="Fizz" elif i%5==0: a="Buzz" else: b=b+i print(b)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
74
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sum = 0; for (int i = 1; i <= n; i++) { if (i % 3 != 0 and i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long sum = 0; for (int i = 1; i <= n; i++) { if (i % 3 != 0 and i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
67
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define SZ(X) ((int)(X).size()) #define endl "\n"; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; ll ans...
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define SZ(X) ((int)(X).size()) #define endl "\n"; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; ll ans...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
103
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int64_t n, ans = 0; cin >> n; rep(i, n) { if (i % 3 != 0 && i % 5 != 0) { ans += i; } } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int64_t n, ans = 0; cin >> n; rep(i, n + 1) { if (i % 3 != 0 && i % 5 != 0) { ans += i; } } cout << ans << endl; }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
65
def solve(n): arr = [i for i in range(n) if i % 3 != 0 and i % 5 != 0] print(sum(arr)) if __name__ == "__main__": n = int(input()) solve(n)
def solve(n): arr = [i for i in range(1, n+1) if i % 3 != 0 and i % 5 != 0] print(sum(arr)) if __name__ == "__main__": n = int(input()) solve(n)
[["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 21], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 12, 612]]
5
56
def solve(n): ans = 0 for i in range(n): if (i % 3 == 0 and i % 5 == 0) or (i % 3 == 0) or (i % 5 == 0): continue else: ans += i print(ans) if __name__ == "__main__": n = int(input()) solve(n)
def solve(n): ans = 0 for i in range(1, n+1): if (i % 3 == 0 and i % 5 == 0) or (i % 3 == 0) or (i % 5 == 0): continue else: ans += i print(ans) if __name__ == "__main__": n = int(input()) solve(n)
[["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
77
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int sum = 0; for (int i = 1; i <= N; i++) { if (i % 3 != 0 && i % 5 != 0) { sum += i; } } cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long sum = 0; for (long long i = 1; i <= N; i++) { if (i % 3 != 0 && i % 5 != 0) { sum += i; } } cout << sum << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]]
1
66
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll sum = 0; for (int i = 1; i < n; i++) if (i % 3 != 0 && i % 5 != 0) sum += i; cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll sum = 0; for (int i = 1; i <= n; i++) if (i % 3 != 0 && i % 5 != 0) sum += i; cout << sum << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
68
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int N; cin >> N; ll ans = 0; rep(i, N) { if (i != 0) if (!(i % 3 == 0 || i % 5 == 0)) ans += i; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int N; cin >> N; ll ans = 0; rep(i, N + 1) { if (i != 0) if (!(i % 3 == 0 || i % 5 == 0)) ans += i; } cout << ans << endl; return 0; ...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
92
n = gets().chomp.to_i sum = 0 (1..n).each do |x| next if x % 3 == 0 next if x % 5 == 0 sum += x end puts x
n = gets().chomp.to_i sum = 0 (1..n).each do |x| next if x % 3 == 0 next if x % 5 == 0 sum += x end puts sum
[["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
43
ans=0 for i in range(int(input())): if i%3!=0 and i%5!=0: ans+=i print(ans)
ans=0 for i in range(int(input())+1): if i%3!=0 and i%5!=0: ans+=i print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
36
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; void func() { int64_t N, ai = 0; ; cin >> N; for (int64_t i = 0; i < N; ++i) { if (i % 3 == 0 || i % 5 == 0) continue; ai += i; } cout << ai <...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; void func() { int64_t N, ai = 0; ; cin >> N; for (int64_t i = 1; i <= N; ++i) { if (i % 3 == 0 || i % 5 == 0) continue; ai += i; } cout << ai ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
92
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; typedef pair<int, int> P; int main(void) { int N; cin >> N; ll sum = 0; for (int i = 1; i < N; i++) { if (i % 3 != 0 && i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; typedef pair<int, int> P; int main(void) { int N; cin >> N; ll sum = 0; for (int i = 1; i <= N; i++) { if (i % 3 != 0 && i % 5 != 0) sum += i; } cout << sum << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
91
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int p; long s = 0; long i = 0; while (i < n) { if (i % 3 == 0 || i % 5 == 0) { } else s += i; i++; } cout << s; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long s = 0; long i = 0; while (i <= n) { if (i % 3 == 0 || i % 5 == 0) { } else s += i; i++; } cout << s; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
68
#include <iostream> using namespace std; int main() { int n = 0; long long int sum = 0; cin >> n; for (int i = 0; i < n; ++i) { if (not(i % 3 == 0 || i % 5 == 0)) { sum = i + sum; } } cout << sum; return 0; }
#include <iostream> using namespace std; int main() { int n = 0; long long int sum = 0; cin >> n; for (int i = 0; i <= n; ++i) { if (not(i % 3 == 0 || i % 5 == 0)) { sum = i + sum; } } cout << sum; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
76
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; long long ans = 0; cin >> n; for (int i = 0; i < n; ++i) { if (i % 3 != 0 && i % 5 != 0) ans += i; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; long long ans = 0; cin >> n; for (int i = 1; i <= n; ++i) { if (i % 3 != 0 && i % 5 != 0) ans += i; } cout << ans << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
67
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define YES() printf("YES\n") #define NO() printf("NO\n") #define isYES(x) printf("%s\n", (x) ? "YES" : "NO") #define Yes() printf("Yes\n") #define No() printf("No\n") #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ...
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define YES() printf("YES\n") #define NO() printf("NO\n") #define isYES(x) printf("%s\n", (x) ? "YES" : "NO") #define Yes() printf("Yes\n") #define No() printf("No\n") #define rep(i, n) for (int i = 0; i <= (int)(n); i++) int main() { ...
[["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]]
1
100
#include <stdio.h> void main() { int a, i, sum = 0; scanf("%d", &a); for (i = 1; i <= a; i++) { if (i % 3 == 0) { sum = sum + 0; } else if (i % 5 == 0) { sum = sum + 0; } else { sum = sum + i; } } printf("%d", sum); }
#include <stdio.h> void main() { long int a, i, sum = 0; scanf("%ld", &a); for (i = 1; i <= a; i++) { if (i % 3 == 0) { sum = sum + 0; } else if (i % 5 == 0) { sum = sum + 0; } else { sum = sum + i; } } printf("%ld", sum); }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
93
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sum = 0; for (int i = 1; i <= n; i++) { if (i % 15 == 0 || i % 3 == 0 || i % 5 == 0) continue; else { sum += i; } } cout << sum; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long sum = 0; for (int i = 1; i <= n; i++) { if (i % 15 == 0 || i % 3 == 0 || i % 5 == 0) continue; else { sum += i; } } cout << sum; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
73
ans = 0 for i in range(1, int(input())): if i % 3 != 0 and i % 5 != 0: ans += i print(ans)
ans = 0 for i in range(1, int(input()) + 1): if i % 3 != 0 and i % 5 != 0: ans += i print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
38
N = int(input()) ls = [] for i in range(N+1): if i % 3 != 0 or i % 5 != 0: ls.append(i) print(sum(ls))
N = int(input()) ls = [] for i in range(N+1): if i % 3 != 0 and i % 5 != 0: ls.append(i) print(sum(ls))
[["-", 0, 7, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355]]
5
48
N= int(input()) ls = [] for i in range(N): if i % 3 == 0 and i % 5 == 0: ls.append(0) elif i % 3 == 0: ls.append(0) elif i % 5 == 0: ls.append(0) else: ls.append(i) print(sum(ls))
N= int(input()) ls = [] for i in range(N+1): if i % 3 == 0 and i % 5 == 0: ls.append(0) elif i % 3 == 0: ls.append(0) elif i % 5 == 0: ls.append(0) else: ls.append(i) print(sum(ls))
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
80
#include <iostream> using namespace std; int main(void) { int n; cin >> n; long long ans = 0; for (int i = 0; i < n; i++) { if (i % 3 > 0 && i % 5 > 0) ans += i; } cout << ans << endl; }
#include <iostream> using namespace std; int main(void) { int n; cin >> n; long long ans = 0; for (int i = 1; i < n + 1; i++) { if (i % 3 > 0 && i % 5 > 0) ans += i; } cout << ans << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
66
// This is free and unencumbered software released into the public domain. // Anyone is free to copy, modify, publish, use, compile, sell, or // distribute this software, either in source code form or as a compiled // binary, for any purpose, commercial or non-commercial, and by any // means. // In jurisdictions that...
// This is free and unencumbered software released into the public domain. // Anyone is free to copy, modify, publish, use, compile, sell, or // distribute this software, either in source code form or as a compiled // binary, for any purpose, commercial or non-commercial, and by any // means. // In jurisdictions that...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
893
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long int ans = 0; for (int i = 1; i <= n; i++) { if (i % 3 == 0 || i % 5 == 0) { ans = ans + i; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long int ans = 0; for (int i = 1; i <= n; i++) { if (i % 3 != 0 && i % 5 != 0) { ans = ans + i; } } cout << ans << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]]
1
70
n = int(input()) a = [] for i in range(n): if (i % 5 == 0) and (i % 3 == 0): continue elif i % 5==0: continue elif i % 3 ==0: continue else: a.append(i) ans = sum(a) print(ans)
n = int(input()) a = [] for i in range(1,n+1): if (i % 5 == 0) and (i % 3 == 0): continue elif i % 5==0: continue elif i % 3 ==0: continue else: a.append(i) ans = sum(a) print(ans)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
72
if __name__ == '__main__': N = int(input()) ans = 0 for i in range(N): if i%3 > 0 and i%5 > 0: ans += i print(ans)
if __name__ == '__main__': N = int(input()) ans = 0 for i in range(1, N+1): if i%3 > 0 and i%5 > 0: ans += i print(ans)
[["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
46