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 |
|---|---|---|---|---|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long N = sc.nextInt();
long sum = 0;
for (int i = 0; i < N; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} els... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long N = sc.nextInt();
long sum = 0;
for (int i = 1; i <= N; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} el... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 125 |
ans=0
K=int(input())
for a in range(K):
if not(a%3==0 or a%5==0):
ans+=a
print(ans) | ans=0
K=int(input())
for a in range(1,K+1):
if not(a%3==0 or a%5==0):
ans+=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 | 42 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N;
int a = 0;
int i = 0;
cin >> N;
while (i < N) {
if ((i + 1) % 3 != 0) {
if ((i + 1) % 5 != 0) {
a = a + i + 1;
}
}
i++;
}
cout << a << endl;
} | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N;
unsigned long long int a = 0;
int i = 0;
cin >> N;
while (i < N) {
if ((i + 1) % 3 != 0) {
if ((i + 1) % 5 != 0) {
a = a + i + 1;
}
}
i++;
}
cout << a << endl;
} | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 84 |
#include <stdio.h>
int main(void) {
int n, i, amari, x, in, ans = 0;
scanf("%d", &n);
amari = n % 15;
x = n - amari;
in = x / 15;
for (i = 0; i < in; i++) {
ans += 60 + 15 * i * 8;
}
if (amari != 0) {
if (amari >= 1) {
ans += 1 + 15 * in;
}
if (amari >= 2) {
ans += 2 + 15 * ... | #include <stdio.h>
int main(void) {
int n, i, amari, x, in;
long long int ans = 0;
scanf("%d", &n);
amari = n % 15;
x = n - amari;
in = x / 15;
for (i = 0; i < in; i++) {
ans += 60 + 15 * i * 8;
}
if (amari != 0) {
if (amari >= 1) {
ans += 1 + 15 * in;
}
if (amari >= 2) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 226 |
line = input()
n = int(line)
ans = 0
for i in range(n):
if i%3 != 0 and i%5 != 0:
ans = ans + i
print(ans) | line = input()
n = int(line)
ans = 0
for i in range(n+1):
if i%3 != 0 and i%5 != 0:
ans = 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 | 44 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
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;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
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;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 71 |
#include <cmath>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
int main(void) {
int N;
scanf("%d", &N);
long long int ans = 0;
for (int m = 0; m < N; m++) {
if (m % 3 == 0) {
} else if (m % 5 == 0) {
} else {
ans += m;
}
}
printf("%lld", ans);
} | #include <cmath>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
int main(void) {
int N;
scanf("%d", &N);
long long int ans = 0;
for (int m = 0; m <= N; m++) {
if (m % 3 == 0) {
} else if (m % 5 == 0) {
} else {
ans += m;
}
}
printf("%lld", ans);
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 90 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
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;
re... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
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 << ... | [["-", 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 | 83 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ul = unsigned long long;
using ld = long double;
#define pb push_back
#define mp make_pair
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
ll sum = 0;
for (int i = 1; i < n; i++) {
if (i % 3 == 0 ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ul = unsigned long long;
using ld = long double;
#define pb push_back
#define mp make_pair
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
ll sum = 0;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 108 |
#include <iostream>
using namespace std;
int main(void) {
long long int val = 0;
cin >> val;
long long int sum = 0;
for (long long int i = 0; i <= val; i++) {
if (val % 15 == 0) {
} else if (val % 3 == 0 && val % 5 != 0) {
} else if (val % 3 != 0 && val % 5 == 0) {
} else {
sum += i;
... | #include <iostream>
using namespace std;
int main(void) {
long long int val = 0;
cin >> val;
long long int sum = 0;
for (long long int i = 0; i <= val; i++) {
if (i % 15 == 0) {
} else if (i % 3 == 0 && i % 5 != 0) {
} else if (i % 3 != 0 && i % 5 == 0) {
} else {
sum += i;
}
}
co... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]] | 1 | 109 |
#include <iostream>
using namespace std;
main() {
long long t = 0;
cin >> t;
long long sum = 0;
for (long long i = 0; i < t; i++) {
if (i % 3 != 0 && i % 5 != 0)
sum += i;
}
cout << sum;
} | #include <iostream>
using namespace std;
main() {
long long t = 0;
cin >> t;
long long sum = 0;
for (long long i = 0; i <= t; i++) {
if (i % 3 != 0 && i % 5 != 0)
sum += i;
}
cout << sum;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 66 |
#include <bits/stdc++.h>
#include <iostream>
#include <list>
#include <numeric>
#include <string>
using namespace std;
int main(void) {
int n;
unsigned long long sum = 0;
cin >> n;
for (int i = 0; i < n; i++) {
if (i % 3 == 0) {
continue;
}
if (i % 5 == 0) {
continue;
}
sum... | #include <bits/stdc++.h>
#include <iostream>
#include <list>
#include <numeric>
#include <string>
using namespace std;
int main(void) {
int n;
unsigned long long sum = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0) {
continue;
}
if (i % 5 == 0) {
continue;
}
su... | [["-", 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 | 83 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int inputNum = Integer.parseInt(sc.next());
int sum = 0;
for (int i = 1; i <= inputNum; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 =... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
Long inputNum = Long.parseLong(sc.next());
Long sum = 0L;
for (int i = 1; i <= inputNum; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 ... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 39, 78], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 195, 8, 196, 0,... | 3 | 136 |
s=int(input())
list=[]
h=0
for i in range(1,s):
if i%3!=0 and i%5!=0:
list.append(i)
for j in list:
h=h+j
print(h) | s=int(input())
list1=[]
h=0
for i in range(1,s+1):
if i%3!=0 and i%5!=0:
list1.append(i)
for j in list1:
h=h+j
print(h) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 12, 22],... | 5 | 58 |
n = int(input())
fizz = 0
buzz = 0
fizzbuzz = 0
num_sum = 0
for num in range(n):
if(num%3 == 0):
fizz += num
if(num%5 == 0):
buzz += num
if(num%3 == 0 and num%5==0):
fizzbuzz += num
num_sum += num
ans = num_sum - fizz - buzz + fizzbuzz
print(ans) | n = int(input())
fizz = 0
buzz = 0
fizzbuzz = 0
num_sum = 0
for num in range(1,n+1):
if(num%3 == 0):
fizz += num
if(num%5 == 0):
buzz += num
if(num%3 == 0 and num%5==0):
fizzbuzz += num
num_sum += num
ans = num_sum - fizz - buzz + fizzbuzz
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 | 86 |
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define ii pair<int, int>
#define F first
#define S second
#define pb push_back
#define pf push_front
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fore(i, a, b) for (int i = a;... | #include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define ii pair<int, int>
#define F first
#define S second
#define pb push_back
#define pf push_front
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define fore(i, a, b) for (int i = a;... | [["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 270 |
N = input()
a = list()
for i in range(int(N)):
if i % 3 == 0 or i % 5 == 0:
continue
else:
a.append(i)
print(sum(a))
| N = input()
a = list()
for i in range(1,int(N)+1):
if i % 3 == 0 or i % 5 == 0:
continue
else:
a.append(i)
print(sum(a))
| [["+", 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 | 50 |
// main
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int16_t sum = 0;
for (int64_t i = 1; i <= n; i++) {
if (i % 3 == 0) { // iが3の倍数のとっき
continue;
}
if (i % 5 == 0) {
continue;
}
sum += i;
}
cout << sum << endl;
} | // main
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
long long sum = 0;
for (int64_t i = 1; i <= n; i++) {
if (i % 3 == 0) { // iが3の倍数のとっき
continue;
}
if (i % 5 == 0) {
continue;
}
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]] | 1 | 76 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int64_t ans = 0;
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;
cin >> N;
int64_t ans = 0;
for (int i = 0; i < N + 1; i++) {
if (i % 3 != 0 && i % 5 != 0) {
ans += i;
}
}
cout << ans << endl;
}
| [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 66 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n, ans = 0;
cin >> n;
for (int i = 1; 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 int n, ans = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 != 0 && i % 5 != 0)
ans += i;
}
cout << ans << endl;
}
| [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 67], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 109]] | 1 | 64 |
#B
n = int(input())
s = 0
for i in range(1,n):
#print(i,i % 3,i % 5)
if i % 3 != 0 and i % 5 != 0:
s += i
#print(s)
print(s) | #B
n = int(input())
s = 0
for i in range(1,n+1):
#print(i,i % 3,i % 5)
if i % 3 != 0 and i % 5 != 0:
s += i
#print(s)
print(s) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 44 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main(void) {
ll sum;
int n;
int i;
cin >> n;
sum = 0;
i = 0;
while (i < n) {
if (i % 3 && i % 5)
sum += i;
i++;
}
cout << sum << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main(void) {
ll sum;
ll n;
ll i;
cin >> n;
sum = 0;
i = 0;
while (i <= n) {
if (i % 3 && i % 5)
sum += i;
i++;
}
cout << sum << endl;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]] | 1 | 81 |
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
for (long long int i = 0; i < n; i++) {
if ((i % 3 != 0) && (i % 5 != 0))
sum += i;
}
cout << sum << endl;
}
| #include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
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], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]] | 1 | 74 |
#include <iostream>
using namespace std;
typedef long long LL;
int main() {
LL i, n, sum = 0;
ios::sync_with_stdio(false);
cin >> n;
for (i = 1; i < n; i += 3)
if (i % 5 != 0)
sum += i;
for (i = 2; i < n; i += 3)
if (i % 5 != 0)
sum += i;
cout << sum;
return 0;
} | #include <iostream>
using namespace std;
typedef long long LL;
int main() {
LL i, n, sum = 0;
ios::sync_with_stdio(false);
cin >> n;
for (i = 1; i <= n; i += 3)
if (i % 5 != 0)
sum += i;
for (i = 2; i <= n; i += 3)
if (i % 5 != 0)
sum += i;
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 | 96 |
#include <stdio.h>
int main() {
long long int n, ans = 0, i;
scanf("%lld", &n);
for (i = 1; i <= n; i++) {
if (n % 3 != 0) {
if (n % 5 != 0) {
if (n % 3 != 0 && n % 5 != 0) {
ans = ans + i;
}
}
}
}
printf("%lld", ans);
return 0;
}
| #include <stdio.h>
int main() {
long long int n, ans = 0, i;
scanf("%lld", &n);
for (i = 1; i <= n; i++) {
if (i % 3 != 0) {
if (i % 5 != 0) {
if (i % 3 != 0 || i % 5 != 0) {
ans = ans + i;
}
}
}
}
printf("%lld", ans);
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 31, 22], ["-", 15, 23, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 31, 22], ["-", 64, 9, 0, 57, 15, 23, 0, 16, 17, 98], ["-", 15, 23, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 64, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["... | 0 | 98 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main() {
long long int ans = 0;
long long int n;
cin >> n;
for (long long int i = 0; i < n; i++) {
ans += i;
if (i % 3 == 0 && i % 5 == 0)
ans = ans - i;
else if (i % ... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main() {
long long int ans = 0;
long long int n;
cin >> n;
for (long long int i = 0; i <= n; i++) {
ans += i;
if (i % 3 == 0 && i % 5 == 0)
ans = ans - i;
else if (i %... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 117 |
def fizzbuzz_sum(n):
result = 0
for num in range(n):
rn = num+1
if rn % 3 == 0 or rn % 5 == 0:
result += rn
return result
n = int(input())
print(fizzbuzz_sum(n)) | def fizzbuzz_sum(n):
result = 0
for num in range(n):
rn = num+1
if rn % 3 != 0 and rn % 5 != 0:
result += rn
return result
n = int(input())
print(fizzbuzz_sum(n))
| [["-", 8, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 79], ["-", 0, 7, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355], ["-", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 79]] | 5 | 55 |
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def L... | import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def L... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 194 |
n = int(input())
res = 0
for i in range(n):
if i%3==0 or i%5==0 or (i%3==0 and i%5==0):
continue
res += i
print(res) | n = int(input())
res = 0
for i in range(1, n+1):
if i%3==0 or i%5==0 or (i%3==0 and i%5==0):
continue
res += i
print(res) | [["+", 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 | 54 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a;
b = 0;
for (int i = 1; i <= a; i++) {
if (i % 3 > 0 && i % 5 > 0) {
b = b + i;
}
}
cout << b << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a;
long long b;
cin >> a;
b = 0;
for (int i = 1; i <= a; i++) {
if (i % 3 > 0 && i % 5 > 0) {
b = b + i;
}
}
cout << b << endl;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 69 |
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int t;
cin >> t;
int sum = 0;
for (int i = 0; i < t; i++) {
if (i % 3 != 0) {
if (i % 5 != 0) {
sum += i;
}
}
}
cout << sum << endl;
return 0;
} | #include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int t;
cin >> t;
long long sum = 0;
for (int i = 1; i <= t; i++) {
if (i % 3 != 0) {
if (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], ["-", 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 | 79 |
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define repp(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define reppe(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define repm(i, a, b) for (in... | #include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define repp(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define reppe(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define repm(i, a, b) for (in... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 152 |
#include <iostream>
using namespace std;
int main(void) {
int num;
long int total;
cin >> num;
total = 0;
for (int i = 0; i < num; i++) {
if (i % 3 != 0 && i % 5 != 0)
total += i;
}
cout << total << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int num;
long int total;
cin >> num;
total = 0;
for (int i = 1; i <= num; i++) {
if (i % 3 != 0 && i % 5 != 0)
total += i;
}
cout << total << 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 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 0;
for (int i = 1; i <= N; i++) {
bool plus = true;
if (i % 3 == 0)
plus = false;
if (i % 5 == 0)
plus = false;
if (plus)
ans += i;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long ans = 0;
for (int i = 1; i <= N; i++) {
bool plus = true;
if (i % 3 == 0)
plus = false;
if (i % 5 == 0)
plus = false;
if (plus)
ans += i;
}
cout << ans << endl;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 83 |
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N = int(read())
x = np.arange(1, N + 1, dtype=np.int64)
x[::3] = 0
x[::5] = 0
print(x.sum())
| import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N = int(read())
x = np.arange(N + 1, dtype=np.int64)
x[::3] = 0
x[::5] = 0
print(x.sum())
| [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
LL mod = 1e9 + 7;
int main() {
LL n;
cin >> n;
LL cnt = 0;
LL sum = 0;
LL i = 1;
while (i < n) {
if (i % 3 != 0 && i % 5 != 0) {
sum += i;
}
i++;
}
cout << sum << "\n";
}
| #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
LL mod = 1e9 + 7;
int main() {
LL n;
cin >> n;
LL cnt = 0;
LL sum = 0;
LL i = 1;
while (i <= n) {
if (i % 3 != 0 && i % 5 != 0) {
sum += i;
}
i++;
}
cout << sum << "\n";
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]] | 1 | 92 |
N = int(input())
print(
sum(
filter(
lambda x: bool(x % 3) and bool(x % 5),
range(1, N)
)
)
)
| N = int(input())
print(
sum(
filter(
lambda x: bool(x % 3) and bool(x % 5),
range(1, N+1)
)
)
)
| [["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 40 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int sum = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 != 0 && 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 && 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], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 71 |
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
int fizz;
int buzz;
int fizzbuzz;
double sum = 0;
for (int i = 1; i <= N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
sum += i;
}
}
cout << sum << endl;
} | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
int fizz;
int buzz;
int fizzbuzz;
long sum = 0;
for (int 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]] | 1 | 79 |
n = 15
a = n//15
b = n//3
c = n//5
d,e,f,g = 0,0,0,0
for i in range(n+1):
d = d+i
for j in range(a+1):
e = e+j
for k in range(b+1):
f = f+k
for l in range(c+1):
g = g+l
h = d-(f*3)-(g*5)+(e*15)
print(int(h)) | n = int(input())
a = n//15
b = n//3
c = n//5
d,e,f,g = 0,0,0,0
for i in range(n+1):
d = d+i
for j in range(a+1):
e = e+j
for k in range(b+1):
f = f+k
for l in range(c+1):
g = g+l
h = d-(f*3)-(g*5)+(e*15)
print(int(h)) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 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], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 121 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, c) for (int i = 0; i < (int)c; i++)
#define debug(x) cout << #x << " is " << endl
int main() {
int N;
cin >> N;
ll ans = 0;
rep(i, N) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, c) for (int i = 1; i < (int)c; i++)
#define debug(x) cout << #x << " is " << endl
int main() {
int N;
cin >> N;
ll ans = 0;
rep(i, N + 1) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else i... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 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 | 111 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
int n;
long long int x, y;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
if (i % 3 != 0 && i % 5 != 0) {
x += i;
}
}
printf("%lld", x);
return 0;
} | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
int n;
long long int x, y;
x = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
if (i % 3 != 0 && i % 5 != 0) {
x += i;
}
}
printf("%lld", x);
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 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,... | 0 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int count = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 == 0 || i % 5 == 0)
count += i;
}
cout << count << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int64_t count = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 != 0 && i % 5 != 0)
count += i;
}
cout << count << endl;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 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], ["+... | 1 | 66 |
#include <bits/stdc++.h>
using namespace std;
inline void ci(void) { return; }
template <typename First, typename... Rest>
void ci(First &first, Rest &...rest) {
cin >> first;
ci(rest...);
return;
}
inline void co(void) {
cout << "\n";
return;
}
template <typename First, typename... Rest> void co(First first,... | #include <bits/stdc++.h>
using namespace std;
inline void ci(void) { return; }
template <typename First, typename... Rest>
void ci(First &first, Rest &...rest) {
cin >> first;
ci(rest...);
return;
}
inline void co(void) {
cout << "\n";
return;
}
template <typename First, typename... Rest> void co(First first,... | [["-", 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, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 1... | 1 | 318 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
cin >> n;
long long sum = 0;
rep(i, n) {
if ((i % 3 == 0) || (i % 5 == 0))
continue;
else
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;
int main() {
int n;
cin >> n;
long long sum = 0;
rep(i, n + 1) {
if ((i % 3 == 0) || (i % 5 == 0))
continue;
else
sum += i;
}
cout << sum << 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 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, total;
cin >> N;
total = 0;
for (int i = 0; i < N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
total = total + i;
}
}
cout << total << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, total;
cin >> N;
total = 0;
for (int i = 0; i <= N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
total = total + i;
}
}
cout << total << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 70 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
void solve(long long N) {
long long sum = 0;
rep(i, N) {
if (i % 3 == 0 || i % 5 == 0) {
continue;
}
sum += i;
}
cout << sum << endl;
}
int main() {
long long N;
scanf("%lld", &N);
solve(N);
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= (n); ++i)
using namespace std;
void solve(long long N) {
long long sum = 0;
rep(i, N) {
if (i % 3 == 0 || i % 5 == 0) {
continue;
}
sum += i;
}
cout << sum << endl;
}
int main() {
long long N;
scanf("%lld", &N);
solve(N);
... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 93 |
import numpy as np
if __name__ == "__main__":
N = int(input())
num_ls = np.arange(0,N)
n = num_ls[(num_ls % 5 != 0) & (num_ls % 3 != 0) & (num_ls % 15 != 0)].astype(np.float64)
ret = 0
ret = sum(n)
print(int(ret))
| import numpy as np
if __name__ == "__main__":
N = int(input())
num_ls = np.arange(1, N+1)
n = num_ls[(num_ls % 5 != 0) & (num_ls % 3 != 0) & (num_ls % 15 != 0)].astype(np.float64)
ret = 0
ret = sum(n)
print(int(ret))
| [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 80 |
n = int(input())
sum = 0
for i in range(n):
if not(((i % 3 == 0) and (i % 5 == 0)) or (i % 3 == 0) or(i % 5 == 0)):
sum += i
print(sum) | n = int(input())
sum = 0
for i in range(n+1):
if not(((i % 3 == 0) and (i % 5 == 0)) or (i % 3 == 0) or(i % 5 == 0)):
sum += i
print(sum) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 64 |
#include <stdio.h>
int main() {
int N, i, sum = 0;
scanf("%d", &N);
for (i = 1; i <= N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
sum = sum + i;
}
}
printf("%d\n", sum);
return 0;
} | #include <stdio.h>
int main() {
long N, i, sum = 0;
scanf("%ld", &N);
for (i = 1; i <= N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
sum = sum + i;
}
}
printf("%ld\n", sum);
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 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 | 77 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
rep(i, n) {
if (i % 3 == 0 || i % 5 == 0)
continue;
else
sum = sum ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
rep(i, n + 1) {
if (i % 3 == 0 || i % 5 == 0)
continue;
else
sum = ... | [["+", 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 | 86 |
def main():
N = int(input())
def fizzbuzz(i):
if i % 3 == 0 and i % 5 == 0:
return 'FizzBuzz'
elif i % 3 == 0:
return 'Fizz'
elif i % 5 == 0:
return 'Buzz'
else:
return i
def is_int(v):
return isinstance(v, int)
ans... | def main():
N = int(input())
def fizzbuzz(i):
if i % 3 == 0 and i % 5 == 0:
return 'FizzBuzz'
elif i % 3 == 0:
return 'Fizz'
elif i % 5 == 0:
return 'Buzz'
else:
return i
def is_int(v):
return isinstance(v, int)
ans... | [["+", 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 | 116 |
//
// Created on 2020/04/12.
//
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#includ... | //
// Created on 2020/04/12.
//
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // deque
#includ... | [["-", 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 | 158 |
N = int(input())
ans = []
ans_num = 0
for i in range(15):
s = i+1
if(s%3 == 0 and s%5 == 0):
ans.append("FizzBuzz")
elif(s%3 == 0):
ans.append("Buzz")
elif(s%5 == 0):
ans.append("Buzz")
else:
ans.append(s)
ans_num += s
print(ans_num)
| N = int(input())
ans = []
ans_num = 0
for i in range(N):
s = i+1
if(s%3 == 0 and s%5 == 0):
ans.append("FizzBuzz")
elif(s%3 == 0):
ans.append("Buzz")
elif(s%5 == 0):
ans.append("Buzz")
else:
ans.append(s)
ans_num += s
print(ans_num)
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long ans = 0;
int i = 0;
int count = 0;
while (count != n) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
ans += i;
}
i++;
count++;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long ans = 0;
int i = 1;
int count = 0;
while (count != n) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
ans += i;
}
i++;
count++;
}
cout << ans << endl;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 78 |
// THE ONLY WAY IS UP
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define f1(i, a, b) for (ll i = a; i < b; i++)
#define f2(a, b) for (auto a : b)
#define ar(v, i) v[i]
#define in_(x) \
ll x; ... |
// THE ONLY WAY IS UP
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define f1(i, a, b) for (ll i = a; i < b; i++)
#define f2(a, b) for (auto a : b)
#define ar(v, i) v[i]
#define in_(x) \
ll x; ... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 133 |
#include <iostream>
using namespace std;
int main() {
int sum = 0, n;
cin >> n;
for (int i = n; i >= 0; i--) {
if (i % 5 != 0 && i % 3 != 0)
sum += i;
}
cout << sum;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long long sum = 0, n;
cin >> n;
for (int i = n; i >= 1; i--) {
if (i % 5 != 0 && i % 3 != 0)
sum += i;
}
cout << sum;
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, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 64 |
package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
fmt.Println(Calc(n))
}
func Calc(n int) int {
var sum int
for i := 1; i < n; i++ {
if i%3 != 0 && i%5 != 0 {
sum += i
}
}
return sum
}
| package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
fmt.Println(Calc(n))
}
func Calc(n int) int {
var sum int
for i := 1; i <= n; i++ {
if i%3 != 0 && i%5 != 0 {
sum += i
}
}
return sum
}
| [["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]] | 7 | 87 |
#include <bits/stdc++.h>
#include <string>
using namespace std;
int K, N, C;
bool flag = false;
int main() {
cin >> N;
int count = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
count += i;
}
}
cout << count;
return 0;
}
| #include <bits/stdc++.h>
#include <string>
using namespace std;
long long K, N, C;
bool flag = false;
int main() {
cin >> N;
long long count = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
count += i;
}
}
cout << count;
return 0;
}
| [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 83 |
#include <stdio.h>
int main() {
long long int N, i, S = 0;
scanf("%lld", &N);
for (i = 0; i < N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
S += i;
}
}
printf("%lld\n", S);
return 0;
}
| #include <stdio.h>
int main() {
long long int N, i, S = 0;
scanf("%lld", &N);
for (i = 1; i < N + 1; i++) {
if (i % 3 != 0 && i % 5 != 0) {
S += i;
}
}
printf("%lld\n", S);
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 77 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
#include <set>
#include <stack>
#include <unordered_map>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(x) (x).begin(), (x).end()
using ll = long lon... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
#include <set>
#include <stack>
#include <unordered_map>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(x) (x).begin(), (x).end()
using ll = long lon... | [["+", 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 | 204 |
n=int(input())
n3=n//3
s3=((n3)*3)(n3+1)//2
n5=n//5
s5=((n5)*5)(n5+1)//2
n15=n//15
s15=((n15)*15)(n15+1)//2
s=n*(n+1)//2
s=s-s3-s5+s15
print(s) | n=int(input())
n3=n//3
s3=(n3*3)*(n3+1)//2
n5=n//5
s5=((n5)*5)*(n5+1)//2
n15=n//15
s15=((n15)*15)*(n15+1)//2
s=n*(n+1)//2
s=s-s3-s5+s15
print(s) | [["-", 31, 652, 63, 23, 0, 657, 31, 23, 0, 24], ["-", 31, 652, 63, 23, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48]] | 5 | 95 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long int N;
cin >> N;
long int count = 0;
for (long int i = 0; i < N; i++) {
if (i % 15 != 0) {
if (i % 3 != 0) {
if (i % 5 != 0) {
count = count + i;
}
}
}
}
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long int N;
cin >> N;
long int count = 0;
for (long int i = 1; i <= N; i++) {
if (i % 15 != 0) {
if (i % 3 != 0) {
if (i % 5 != 0) {
count = count + i;
}
}
}
}
cout << count << 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 | 85 |
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in ... | import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in ... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 140 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, res = 0;
cin >> N;
for (int i = 1; i <= N; i++) {
if ((i % 5 != 0) && (i % 3 != 0)) {
res += i;
}
}
cout << res << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
long int res = 0;
cin >> N;
for (int i = 1; i <= N; i++) {
if ((i % 5 != 0) && (i % 3 != 0)) {
res += i;
}
}
cout << res << endl;
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]] | 1 | 72 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int inf = 1000000000;
int main() {
int n;
cin >> n;
ll ans = 0;
rep(i, n) {
if (i % 3 != 0 && i % 5 != 0) {
ans += i;
// cout << i << endl;
}
}
cout << ans <<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i <= (int)(n); i++)
const int inf = 1000000000;
int main() {
int n;
cin >> n;
ll ans = 0;
rep(i, n) {
if (i % 3 != 0 && i % 5 != 0) {
ans += i;
// cout << i << endl;
}
}
cout << ans <... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 78 |
#include <iostream>
using namespace std;
int main() {
int N, s = 0, i;
cin >> N;
for (i = 1; i <= N; i++) {
if ((i % 3 == 0) || (i % 5 == 0))
continue;
else
s = s + i;
}
cout << s;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long long int N, s = 0, i;
cin >> N;
for (i = 1; i <= N; i++) {
if ((i % 3 == 0) || (i % 5 == 0))
continue;
else
s = s + i;
}
cout << s;
return 0;
} | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 74 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
long long int sum = 0;
cin >> N;
for (int i = 1; i < N; i++) {
if (i % 3 == 0 || i % 5 == 0)
continue;
sum += i;
}
cout << sum << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
long long int sum = 0;
cin >> N;
for (int i = 1; i <= N; i++) {
if (i % 3 == 0 || i % 5 == 0)
continue;
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>
using namespace std;
int main() {
int N;
long S = 0;
cin >> N;
for (int i = 0; i < N; i++)
if (i % 3 && i % 5)
S += i;
cout << S;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
long S = 0;
cin >> N;
for (int i = 1; i <= N; i++)
if (i % 3 && i % 5)
S += i;
cout << S;
} | [["-", 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 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
unsigned long long int sum = 0;
for (int i = 1; i < n; ++i) {
if (!(i % 3 == 0 || i % 5 == 0)) {
sum += i;
}
}
cout << sum;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
unsigned long long int sum = 0;
for (int i = 1; i <= n; ++i) {
if (!(i % 3 == 0 || i % 5 == 0)) {
sum += i;
}
}
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 | 73 |
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
for (long long int i = 0; i < n; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} else if (i % 5 == 0)... | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int sum = 0;
for (long long int i = 1; i <= n; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} else if (i % 5 == 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 | 110 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i < (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(int argc, const char *argv[]) {
int N = 0;
ll sum = 0;
cin >> N;
rep(i, N) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
sum += i;
}
}
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= (int)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(int argc, const char *argv[]) {
int N = 0;
ll sum = 0;
cin >> N;
rep(i, N) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
sum += i;
}
}... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 97 |
#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
template <typename T> using vec2d = vector<vector<T>>;
template <typename T> using vec3d = vector<vector<vector<T>>>;
template <typename T> using vec4d = vector<vector<vector<vector<T>>... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
template <typename T> using vec2d = vector<vector<T>>;
template <typename T> using vec3d = vector<vector<vector<T>>>;
template <typename T> using vec4d = vector<vector<vector<vector<T>>... | [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 78], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 1,871 |
N = int(input())
x = 0
for i in range(N):
if i % 15 == 0:
#FB
pass
elif i % 3 == 0:
#F
pass
elif i % 5 == 0:
#B
pass
else:
x += i
print(x) | N = int(input())
x = 0
for i in range(N+1):
#print(i)
if i % 15 == 0:
#FB
pass
elif i % 3 == 0:
#F
pass
elif i % 5 == 0:
#B
pass
else:
x += i
print(x)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 55 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <string>
#include <vector>
using namespace std;
int main() {
unsigned long long int n, t = 0;
cin >> n;
for (unsigned long long int i = 0; i < n; i++) {
if (0 == i % 15) {
continue;
} else if (0 == i % 3) {
co... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <string>
#include <vector>
using namespace std;
int main() {
unsigned long long int n, t = 0;
cin >> n;
for (unsigned long long int i = 0; i <= n; i++) {
if (0 == i % 15) {
continue;
} else if (0 == i % 3) {
c... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 106 |
import sys
n = int(sys.stdin.readline())
t = 0
for i in range(n):
if i%3 != 0 and i%5 != 0:
t += i
print(t)
| import sys
n = int(sys.stdin.readline())
t = 0
for i in range(n+1):
if i%3 != 0 and i%5 != 0:
t += i
print(t)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 45 |
// https://atcoder.jp/contests/abc162/tasks/abc162_b
#include <iostream>
using namespace std;
int main() {
int n, n3, n5, n15;
cin >> n;
n3 = n / 3;
n5 = n / 5;
n15 = n / 15;
cout << ((n * (n + 1)) >> 1) - 3 * ((n3 * (n3 + 1)) >> 1) -
5 * ((n5 * (n5 + 1)) >> 1) + 15 * ((n15 * (n15 + 1)) >> 1... | // https://atcoder.jp/contests/abc162/tasks/abc162_b
#include <iostream>
using namespace std;
int main() {
long long int n, n3, n5, n15;
cin >> n;
n3 = n / 3;
n5 = n / 5;
n15 = n / 15;
cout << ((n * (n + 1)) >> 1) - 3 * ((n3 * (n3 + 1)) >> 1) -
5 * ((n5 * (n5 + 1)) >> 1) + 15 * ((n15 * (n15 ... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 113 |
#include <bits/stdc++.h>
using namespace std;
template <class T> T gcd(T a, T b) {
while (b) {
a %= b;
swap(a, b);
}
return a;
}
int main() {
int n;
cin >> n;
long long int count = 0;
for (int i = 1; i < n; i++) {
if (i % 3 == 0 || i % 5 == 0 || i % 15 == 0) {
continue;
} else {
... | #include <bits/stdc++.h>
using namespace std;
template <class T> T gcd(T a, T b) {
while (b) {
a %= b;
swap(a, b);
}
return a;
}
int main() {
int n;
cin >> n;
long long int count = 0;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0 || i % 5 == 0 || i % 15 == 0) {
continue;
} else {
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 115 |
import sys, re
import math
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
# 整数リストを連結表示 print(''.join(map(str, list)))
... | import sys, re
import math
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
# 整数リストを連結表示 print(''.join(map(str, list)))... | [["+", 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 | 135 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
long long out = 0;
for (int i = 0; i != N; i++) {
if ((i % 3) && (i % 5))
out += i;
}
cout << out << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
long long out = 0;
for (int i = 0; i != N + 1; i++) {
if ((i % 3) && (i % 5))
out += i;
}
cout << out << endl;
return 0;
} | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 74 |
#include <stdio.h>
int main() {
int N = 0;
int x = scanf("%d", &N);
int sum = 0;
for (int i = 1; i <= N; ++i) {
if (i % 3 != 0 && i % 5 != 0) {
sum += i;
}
}
printf("%d\n", sum);
return 0;
}
| #include <stdio.h>
int main() {
long long int N = 0;
int x = scanf("%lld", &N);
long long int sum = 0;
for (int i = 1; i <= N; ++i) {
if (i % 3 != 0 && i % 5 != 0) {
sum += i;
}
}
printf("%lld\n", sum);
return 0;
}
| [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 49, 50, 51, 2, 3, 4, 0, 5, 0, 6], ["+", 49, 50, 51, 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]] | 0 | 80 |
#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++) {
int plus = i;
if (i % 3 == 0)
plus = 0;
if (i % 5 == 0)
plus = 0;
ans += plus;
}
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++) {
int plus = i;
if (i % 3 == 0)
plus = 0;
if (i % 5 == 0)
plus = 0;
ans += plus;
}
cout << ans << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 81 |
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
if row <= 0:
... | import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
if row <= 0:
... | [["+", 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 | 187 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 3 == 0 || i % 5 == 0)
continue;
else
sum += i;
}
cout << sum << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long n, sum = 0;
cin >> n;
for (long i = 1; i <= n; i++) {
if (i % 3 == 0 || i % 5 == 0)
continue;
else
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 |
N=int(input())
i=0
k=0
ans=0
nums =[]
while(i<N):
if(i%3!=0) and (i%5!=0):
nums.append(i)
k+=1
i+=1
for k in range(0,k):
ans+=nums[k]
print(ans) | N=int(input())
i=0
k=0
ans=0
nums =[]
while(i<N+1):
if(i%3!=0) and (i%5!=0):
nums.append(i)
k+=1
i+=1
for k in range(0,k):
ans+=nums[k]
print(ans) | [["+", 0, 52, 15, 23, 0, 666, 0, 657, 17, 72], ["+", 0, 52, 15, 23, 0, 666, 0, 657, 12, 612]] | 5 | 77 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
ans += i;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
long int ans = 0;
for (int i = 1; i < N + 1; i++) {
if (i % 3 == 0 || i % 5 == 0) {
} else {
ans += i;
}
}
cout << ans << endl;
} | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, sum = 0, i, k;
cin >> a;
for (i = 4; i <= a; i++) {
{
if (i % 3 == 0 || i % 5 == 0 || i % 15 == 0) {
sum += i;
}
}
}
k = (a * (a + 1)) / 2;
cout << k - sum - 3 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, sum = 0, i, k;
cin >> a;
for (i = 3; i <= a; i++) {
{
if (i % 3 == 0 || i % 5 == 0 || i % 15 == 0) {
sum += i;
}
}
}
k = (a * (a + 1)) / 2;
cout << k - sum << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 98 |
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll i = 0; i < n; i++) {
if (i % 5 != 0 && i % 3 != 0)
ans += i;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (a); i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll i = 1; i < n + 1; i++) {
if (i % 5 != 0 && i % 3 != 0)
ans += i;
}
cout << ans << endl;
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 91 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll n, tot = 0;
cin >> n;
REP(i, n) {
... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 1; i <= n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll n, tot = 0;
cin >> n;
// ll three... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 95 |
#include <bits/stdc++.h>
using namespace std;
void solve(long long N) {
long long ans = 0;
for (long long i = 0; i < N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
ans += i;
}
}
cout << ans << endl;
}
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// use the default... | #include <bits/stdc++.h>
using namespace std;
void solve(long long N) {
long long ans = 0;
for (long long i = 1; i <= N; i++) {
if (i % 3 != 0 && i % 5 != 0) {
ans += i;
}
}
cout << ans << endl;
}
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// use the defaul... | [["-", 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 | 95 |
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long sum = 0;
for (long long i = 0; i < n; i++) {
if ((i % 3) != 0 || (i % 5) != 0)
sum += i;
}
cout << sum << endl;
}
| #include <iostream>
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;
}
| [["-", 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], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
typedef long long int ll;
ll N, sum = 0;
cin >> N;
for (ll i = 0; i < N; i++) {
if (i % 5 != 0 && i % 3 != 0) {
sum += i;
}
}
cout << sum << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
typedef long long int ll;
ll N, sum = 0;
cin >> N;
for (ll i = 1; i < N + 1; i++) {
if (i % 5 != 0 && i % 3 != 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], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 74 |
n=int(input())
ai = 0
s = 0
for i in range(n):
ai = i
if(i % 3 == 0 or i % 5 == 0):
ai = 0
s += ai
print(s) | n=int(input())
ai = 0
s = 0
for i in range(n+1):
ai = i
if(i % 3 == 0 or i % 5 == 0):
ai = 0
s += ai
print(s) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 50 |
N=1000000
n=N//15
ans=60*(n**2)
if N%15==1:
ans+=(1+15*(n))
elif N%15==2 or N%15==3:
ans+=(3+30*(n))
elif N%15==4 or N%15==5 or N%15==6:
ans+=(7+45*(n))
elif N%15==7:
ans+=(14+60*(n))
elif N%15==8 or N%15==9 or N%15==10:
ans+=(22+75*(n))
elif N%15==11 or N%15==12:
ans+=(33+90*(n))
elif N%15==13:
ans+=(46+105*(n)... | N=int(input())
n=N//15
ans=60*(n**2)
if N%15==1:
ans+=(1+15*(n))
elif N%15==2 or N%15==3:
ans+=(3+30*(n))
elif N%15==4 or N%15==5 or N%15==6:
ans+=(7+45*(n))
elif N%15==7:
ans+=(14+60*(n))
elif N%15==8 or N%15==9 or N%15==10:
ans+=(22+75*(n))
elif N%15==11 or N%15==12:
ans+=(33+90*(n))
elif N%15==13:
ans+=(46+10... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 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], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 201 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long int LL;
typedef pair<int, int> P;
typedef pair... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long int LL;
typedef pair<int, int> P;
typedef pair... | [["+", 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 | 409 |
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int a;
cin >> a;
vector<int> v(a);
for (int i = 1; i <= a; ++i) {
if ((i % 3 == 0) && (i % 5 == 0))
v[i] = 0;
else if ((i % 3) == 0)
v[i] = 0;
else if ((i % 5) == 0)
v[i] = 0;
else
... | #include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int a;
cin >> a;
vector<int> v(a + 1);
for (int i = 1; i <= a; ++i) {
if ((i % 3 == 0) && (i % 5 == 0))
v[i] = 0;
else if ((i % 3) == 0)
v[i] = 0;
else if ((i % 5) == 0)
v[i] = 0;
else
... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13]] | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 326 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int A = stdIn.nextInt();
long ans = 0;
for (int i = 0; i < A; i++) {
if (i % 3 == 0 || i % 5 == 0)
;
else
ans += i;
}
System.out.println(... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int A = stdIn.nextInt();
long ans = 0;
for (int i = 0; i <= A; i++) {
if (i % 3 == 0 || i % 5 == 0)
;
else
ans += i;
}
System.out.printl... | [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 94 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define pb push_back
#define mod 1000000007
#define mp make_pair
#define fast
#define f first
#define s second
#define endl "\n"
#define pie 3.1415926535
int main() {
int n;
cin >> n;
long long sum = 0;
for ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define pb push_back
#define mod 1000000007
#define mp make_pair
#define fast
#define f first
#define s second
#define endl "\n"
#define pie 3.1415926535
int main() {
int n;
cin >> n;
long long sum = 0;
for ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
long N;
cin >> N;
long a, sum = 0;
for (int i = 1; i < N; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} else if (i % 5 == 0) {
continue;
} else {
sum += i;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
long N;
cin >> N;
long sum = 0;
for (int i = 1; i <= N; i++) {
if (i % 3 == 0 && i % 5 == 0) {
continue;
} else if (i % 3 == 0) {
continue;
} else if (i % 5 == 0) {
continue;
} else {
sum += i;
}
}
co... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.