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>
#define pll pair<long long, long long>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define vll vector<ll>
#define NFS \
ios_base::sync_with_stdio(0); ... |
#include <bits/stdc++.h>
#define pll pair<long long, long long>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define vll vector<ll>
#define NFS \
ios_base::sync_with_stdio(0); ... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 108 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, c, d;
double b;
cin >> a;
b = a % 1000;
if (b == '0')
cout << '0';
if (b != '0')
cout << 1000 - b;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, c, d;
int b;
int f;
cin >> a;
b = a % 1000;
if (b == 0)
cout << '0';
if (b != 0)
cout << 1000 - b;
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 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], ["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 104]] | 1 | 63 |
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.8.2)
import math
import statistics
import numpy as np
import queue
import itertools
import functools
n = int(input())
print(0 if n == 1000 else 1000 - (n % 1000))
| # coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.8.2)
import math
import statistics
import numpy as np
import queue
import itertools
import functools
n = int(input())
print(0 if n % 1000 == 0 else 1000 - (n % 1000))
| [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 3, 4, 0, 41, 0, 666, 0, 657, 17, 109], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 612]] | 5 | 43 |
#AtCoder
N = int(input())
if (N % 1000 == 0):
print(0)
else:
print(N % 1000) | N = int(input())
if (N % 1000 == 0):
print(0)
else:
print(1000 - N % 1000) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 30 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int d = (n + 999) / 1000;
cout << (d * 1000) - n;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int d = (n + 999) / 1000;
cout << (d * 1000) - n;
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 39 |
print(100000-int(input())%1000)
| print((100000-int(input()))%1000) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 13 |
N = int(input())
m = N % 1000
if m == 0:
print(0)
else:
print(N - m) | N = int(input())
m = N % 1000
if m == 0:
print(0)
else:
print(1000 - m) | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 612]] | 5 | 30 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <map>
#include <queue>
#incl... | [["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13]] | 1 | 96 |
n = 1000 - (gets.chomp.to_i % 1000)
puts n == 0 ? 0 : n | n = 1000 - (gets.chomp.to_i % 1000)
puts n == 1000 ? 0 : n | [["-", 0, 652, 3, 4, 0, 754, 15, 738, 12, 612], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 12, 612]] | 4 | 21 |
N = int(input())
N = N % 1000
ans = 1000 - N if not N else 0
print(ans) | N = int(input())
N = N % 1000
ans = 1000 - N if N else 0
print(ans)
| [["-", 0, 1, 0, 662, 12, 41, 0, 681, 0, 372]] | 5 | 27 |
import math
price = input()
payment = math.ceil(float(price) / 1000) * 1000
result = payment - price
print(int(result)) | import math
price = int(input())
payment = math.ceil(float(price) / 1000) * 1000
result = payment - price
print(int(result)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 34 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
int y = 0;
cin >> x;
if (x % 1000 == 0) {
cout << "0";
}
else {
for (int i = 0; i < 10000; i++) {
if (x % 1000 != 0) {
x = x + 100;
y = y + 100;
} else
break;
}
cout << y;
}
return 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
int y = 0;
cin >> x;
if (x % 1000 == 0) {
cout << "0";
}
else {
for (int i = 0; i < 10000; i++) {
if (x % 1000 != 0) {
x = x + 1;
y = y + 1;
} else
break;
}
cout << y;
}
return 0;
}
| [["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 91 |
#include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define PII pair<int, int>
#define LL long long
#define pb push_back
#define pqp priority_queue<PII, vector<PII>, greater<PII>>
#define pqi priority_queue<int, vector<int>, greater<int>>
#define PSS pair<string, string>
#define in insert
#... | #include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define PII pair<int, int>
#define LL long long
#define pb push_back
#define pqp priority_queue<PII, vector<PII>, greater<PII>>
#define pqi priority_queue<int, vector<int>, greater<int>>
#define PSS pair<string, string>
#define in insert
#... | [["-", 31, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13]] | 1 | 256 |
N=int(input())
if N%1000==0:
print(0)
else:
N1=N%1000
print(N1) | N=int(input())
if N%1000==0:
print(0)
else:
N1=N%1000
print(1000-N1) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 30 |
#include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
cout << (N % 1000) << endl;
}
| #include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
cout << (1000 - N % 1000) % 1000 << endl;
}
| [["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 30 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
ll l, r, a, x, y, z, b, c, i, j, k, n, m;
ll arr[2000005], ans[2000005];
string s, str;
int main() {
cin >> n;
n = n % 1000;
n = 1000 - n;
cout << n;
ret... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
ll l, r, a, x, y, z, b, c, i, j, k, n, m;
ll arr[2000005], ans[2000005];
string s, str;
int main() {
cin >> n;
n = n % 1000;
n = 1000 - n;
n = n % 1000;
... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 94 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
return 0;
} | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 32 |
n=int(input())
if n%1000==0:
print(0)
else:
x=math.ceil(n/1000)
ans=int(x*1000)-n
print(ans)
| import math
n=int(input())
if n%1000==0:
print(0)
else:
x=math.ceil(n/1000)
ans=int(x*1000)-n
print(ans)
| [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 45 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int maisu = 0;
int otsuri = 0;
if (n % 1000 == 0) {
System.out.println(0);
} else {
maisu = n / 1000;
otsuri = maisu * ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int maisu = 0;
int otsuri = 0;
if (n % 1000 == 0) {
System.out.println(0);
} else {
maisu = n / 1000 + 1;
otsuri = mais... | [["+", 75, 196, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 75, 196, 0, 1, 0, 11, 12, 16, 12, 499]] | 3 | 105 |
n=int(input())
if n%1000:
print(n-n//1000*1000)
else:
print(0) | n=int(input())
if n%1000:
print(1000-(n-n//1000*1000))
else:
print(0) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 29 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define desc greater<int>()
void solve() {
int n;
cin >> n;
int ans = 1000 - n % 1000;
cout << ans;
}
int main() {
/*
string temp;
int t;
cin >> t;
getline(cin, temp);
whil... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define desc greater<int>()
void solve() {
int n;
cin >> n;
int ans = 1000 - n % 1000;
cout << ans % 1000;
}
int main() {
/*
string temp;
int t;
cin >> t;
getline(cin, temp);
... | [["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 58 |
n = int(input())
for i in range(0, n//1000+1, 1):
n -= 1000
if n == 1000:
print(0)
else:
print(abs(n)) | n = int(input())
for i in range(0, n//1000+1, 1):
n -= 1000
if n == -1000:
print(0)
else:
print(abs(n)) | [["+", 0, 656, 0, 57, 15, 666, 0, 664, 17, 33]] | 5 | 45 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int ans;
cin >> n;
ans = n / 1000;
if (ans == 0)
cout << 0 << endl;
else
cout << 1000 - ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int ans;
cin >> n;
ans = n % 1000;
if (ans == 0)
cout << 0 << endl;
else
cout << 1000 - ans << endl;
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109]] | 1 | 52 |
#include <bits/stdc++.h>
using namespace std;
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long lon... | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef long lon... | [["+", 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 | 250 |
#include <stdio.h>
int main() {
int N, s, total;
printf("N");
scanf("%d", &N);
s = N / 1000;
if (N > s * 1000) {
s += 1;
total = s * 1000 - N;
}
total = s * 1000 - N;
printf("%d\n", total);
return 0;
}
| #include <stdio.h>
int main() {
int N, s, total;
scanf("%d", &N);
s = N / 1000;
if (N > s * 1000) {
s += 1;
total = s * 1000 - N;
}
total = s * 1000 - N;
printf("%d\n", total);
return 0;
}
| [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 0 | 81 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (N + 1000 - 1) / 1000 - N << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << ((N + 1000 - 1) / 1000) * 1000 - N << endl;
} | [["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48]] | 1 | 35 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
N %= 1000;
if (N == 1000)
puts("0");
else
printf("%d", 1000 - N);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
N %= 1000;
if (N == 1000 || N == 0)
puts("0");
else
printf("%d", 1000 - N);
return 0;
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 51 |
#include <bits/stdc++.h>
using namespace std;
#define LOCAL
#define pb push_back
#define mk make_pair
#define all(x) (x).begin(), (x).end()
//#define size(x), ((int)(x).size())
#define fi first
#define se second
#define deb(x) cout << #x << " = " << x << endl;
#define deb2(x, y) cout << #x << " = " << x << " " << #y... | #include <bits/stdc++.h>
using namespace std;
//#define LOCAL
#define pb push_back
#define mk make_pair
#define all(x) (x).begin(), (x).end()
//#define size(x), ((int)(x).size())
#define fi first
#define se second
#define deb(x) cout << #x << " = " << x << endl;
#define deb2(x, y) cout << #x << " = " << x << " " << ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148]] | 1 | 226 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int pay = 1000 * (int)Math.ceil(N / 1000);
System.out.println(pay - N);
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double N = sc.nextInt();
int pay = 1000 * (int)Math.ceil(N / 1000);
System.out.println((int)(pay - N));
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 492, 3, 4, 0, 74, 0, 25], ["+", 0, 492, 3, 4, 0, 74, 51, 23, 0, 24], ["+", 0, 492, 3, 4, 0, 74, 51, 23, 0, 25]] | 3 | 72 |
N = int(input())
k = N/1000
if N%1000==0:
print(0)
else:
print(1000*k-N) | N = int(input())
k = N//1000
if N%1000==0:
print(0)
else:
print(1000*(k+1)-N) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 24], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 17, 72], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 657, 12, 23, 0, 25]] | 5 | 34 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int left = N % 1000;
if (left == 1000) {
cout << 0 << endl;
} else {
cout << 1000 - N % (1000) << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int left = N % 1000;
if (left == 0) {
cout << 0 << endl;
} else {
cout << 1000 - N % (1000) << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 55 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define gof for (long long int i = 0; i < n; i++)
#define for1(i, s, e) for (long long int i = s; i < e; i++)
#define forr(i, e, s) for (long long int i = e; i >= s; i--)
#define vi vector<long long int>
#define all(x) x.begin(), x.end()
#define pb... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define gof for (long long int i = 0; i < n; i++)
#define for1(i, s, e) for (long long int i = s; i < e; i++)
#define forr(i, e, s) for (long long int i = e; i >= s; i--)
#define vi vector<long long int>
#define all(x) x.begin(), x.end()
#define pb... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, x;
cin >> n;
x = n / 1000;
if (n % 1000 != 0)
x++;
cout << x << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, x;
cin >> n;
x = n / 1000;
if (n % 1000 != 0)
x++;
cout << x * 1000 - n << endl;
return 0;
} | [["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 48 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
cout << (n / 1000) * 1000 - n << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
cout << ceil((float)n / 1000) * 1000 - n << endl;
return 0;
} | [["+", 31, 16, 12, 16, 31, 16, 31, 2, 63, 22], ["+", 12, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 31, 2, 3, 4, 0, 16, 31, 74, 0, 25]] | 1 | 63 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
int main() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
} | #include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
int main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
} | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 42 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, z;
cin >> x;
y = x % 1000;
z = x / 1000;
if (y != 0) {
z += 1;
}
z *= 1000;
z - x;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, z;
cin >> x;
y = x % 1000;
z = x / 1000;
if (y != 0) {
z += 1;
}
z *= 1000;
cout << z - x << endl;
} | [["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 55 |
#include <iostream>
using namespace std;
int main() {
long long int N;
cin >> N;
cout << (1000 - N % 1000) << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long long int N;
cin >> N;
cout << (1000 - N % 1000) % 1000 << endl;
return 0;
}
| [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 36 |
#include <iostream>
int N, res;
int main() {
std::cin >> N;
res = N % 1000;
if (res == 0)
std::cout << "0";
std::cout << 1000 - res;
return 0;
}
| #include <iostream>
int N, res;
int main() {
std::cin >> N;
res = N % 1000;
if (res == 0)
std::cout << "0";
else
std::cout << (1000 - res);
return 0;
}
| [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 75, 76, 0, 1, 0, 16, 12, 23, 0, 24], ["+", 75, 76, 0, 1, 0, 16, 12, 23, 0, 25]] | 1 | 50 |
input_line = input()
a = input_line % 1000
if a == 0:
print(0)
else:
print(1000-a) | input_line = int(input())
a = input_line % 1000
if a == 0:
print(0)
else:
print(1000-a) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 27 |
n=int(input())%1000
print(n==0 if 0 else 1000-n) | n=int(input())%1000
print(0 if n==0 else 1000-n) | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60]] | 5 | 22 |
// 12/07/2020 @ 19:54:17
// *****************************************************************
// *****************************************************************
#include <bits/stdc++.h>
// *****************************************************************
// ***********************************************************... | // 12/07/2020 @ 19:54:17
// *****************************************************************
// *****************************************************************
#include <bits/stdc++.h>
// *****************************************************************
// ***********************************************************... | [["-", 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 | 227 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int n;
void solve() { cout << n % 1000 << endl; }
int main() {
cin >> n;
solve();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int n;
void solve() { cout << (1000 - n % 1000) % 1000 << endl; }
int main() {
cin >> n;
solve();
return 0;
}
| [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 58 |
#include "bits/stdc++.h"
using namespace std;
const int MAX = 700000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD ... | #include "bits/stdc++.h"
using namespace std;
const int MAX = 700000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33]] | 1 | 662 |
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int res = 1000 * ceil(N / 1000) - N;
cout << res;
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int res = abs(1000 * ceil((float)N / 1000) - N);
cout << res;
return 0;
} | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 42 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
while (N > 0) {
N = N - 1000;
}
cout << N;
if (N == 0) {
cout << 0 << endl;
} else {
cout << -N << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
while (N > 0) {
N = N - 1000;
}
if (N == 0) {
cout << 0 << endl;
} else {
cout << -N << endl;
}
} | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 61 |
#N円の商品を1000円札で支払う時のおつり。
price=int(input())
surpus=price%1000
print(1000-surpus)
| #N円の商品を1000円札で支払う時のおつり。
price=int(input())
surpus=price%1000
print((1000-surpus)%1000)
| [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 20 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000) {
n %= 1000;
cout << 1000 - n;
} else
cout << n / 1000;
}
| #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 != 0) {
n %= 1000;
cout << 1000 - n;
} else
cout << 0;
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 75, 76, 0, 1, 0, 16, 12, 16, 31, 22], ["-", 75, 76, 0, 1, 0, 16, 12, 16, 17, 85], ["-", 75, 76, 0, 1, 0, 16, 12, 16, 12, 13], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 12, 13]] | 1 | 44 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = n % 1000;
if (0 == n) {
ans = 0;
} else {
ans = 1000 - ans;
}
cout << ans << endl;
return 0;
}
| // https://atcoder.jp/contests/abc173/tasks/abc173_a
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = n % 1000;
if (0 == ans) {
ans = 0;
} else {
ans = 1000 - ans;
}
cout << ans << endl;
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 58 |
#include <iostream>
int main() {
int N;
std::cin >> N;
N = 1000 - (N % 1000);
std::cout << N << std::endl;
} | #include <iostream>
int main() {
int N;
std::cin >> N;
N = (1000 - (N % 1000)) % 1000;
std::cout << N << std::endl;
} | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 37 |
import math
N = int(input())
A = (math.floor(N/1000))
B=N- A*1000
print(B)
| import math
N = int(input())
A = (math.ceil(N/1000))
B=A*1000 - N
print(B) | [["-", 0, 662, 12, 23, 0, 652, 63, 319, 319, 22], ["+", 0, 662, 12, 23, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 33 |
N = int(input())
if N / 1000 == 0:
print(0)
else:
print(1000 - N % 1000) | N = int(input())
if N % 1000 == 0:
print(0)
else:
print(1000 - N % 1000)
| [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109]] | 5 | 29 |
#include <iostream>
using namespace std;
int main() {
int X;
cin >> X;
if (X % 1000 == 0)
cout << 0 << endl;
else
cout << X - X % 1000 << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int X;
cin >> X;
if (X % 1000 == 0)
cout << 0 << endl;
else
cout << 1000 - X % 1000 << endl;
return 0;
} | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13]] | 1 | 47 |
#include <iostream>
using namespace std;
int main() {
int N;
if (N % 1000 == 0) {
cout << 0 << endl;
} else {
cout << 1000 - (N % 1000) << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 1000 == 0) {
cout << 0 << endl;
} else {
cout << 1000 - (N % 1000) << endl;
}
return 0;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 49 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
if (N / 1000 != 0) {
cout << 1000 - (N % 1000) << endl;
} else {
cout << 0 << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 1000 != 0) {
cout << 1000 - (N % 1000) << endl;
} else {
cout << 0 << endl;
}
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109]] | 1 | 50 |
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int N, a;
cin >> N;
if (N % 1000 == 0) {
a = (N / 1000 + 1) * 100... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int N, a;
cin >> N;
if (N % 1000 != 0) {
a = (N / 1000 + 1) * 100... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 89 |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
template <class TH> void _dbg(const char *sdbg, TH h) {
cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
while (*sdbg != ',')
cerr << *sdbg++;
cerr <... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
template <class TH> void _dbg(const char *sdbg, TH h) {
cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
while (*sdbg != ',')
cerr << *sdbg++;
cerr <... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 159 |
N = int(input(""))
if N % 1000 == 0:
N1 = N // 1000
else:
N1 = N // 1000 + 1
print(N1) | N = int(input(""))
if N % 1000 == 0:
N1 = N // 1000
else:
N1 = N // 1000 + 1
print(N1 * 1000 - N) | [["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 35 |
n=int(input())
if n==0:
print('0')
else:
print(1000-n) | n=int(input())
n%=1000
if n==0:
print('0')
else:
print(1000-n) | [["+", 36, 36, 0, 656, 0, 1, 0, 677, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 132], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612]] | 5 | 27 |
n=input()
print(999-((n-1)%1000)) | n=int(input())
print(999-((n-1)%1000)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 19 |
#include <bits/stdc++.h>
using namespace std;
int change(int n) { return (1000 - (n % 1000)); }
int main() {
int n;
cin >> n;
int res = change(n);
cout << res;
} | #include <bits/stdc++.h>
using namespace std;
int change(int n) { return (1000 - (n % 1000)) % 1000; }
int main() {
int n;
cin >> n;
int res = change(n);
cout << res;
} | [["+", 0, 14, 8, 9, 0, 37, 0, 16, 17, 109], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 12, 13]] | 1 | 50 |
print(1000-(int(input())%1000)%1000) | print((1000-(int(input())%1000))%1000) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 25]] | 5 | 17 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int m = 0;
m = n % 1000;
if (m > 500)
cout << (1000 - m) << endl;
else
cout << m << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int m = 0;
m = n % 1000;
if (m != 0)
cout << (1000 - m) << endl;
else
cout << 0 << endl;
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 75, 76, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 75, 76, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 56 |
#include <iostream>
int main() {
int n;
std::cin >> n;
std::cout << 1000 - (n % 1000) << '\n';
return 0;
} | #include <iostream>
int main() {
int n;
std::cin >> n;
std::cout << (1000 - (n % 1000)) % 1000 << '\n';
return 0;
} | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 36 |
N = float(input())
if int(N) % 1000 == 0:
print(int(N))
else:
M = (int(N / 1000) + 1) * 1000
print(int(M - N))
| N = float(input())
if int(N) % 1000 == 0:
print(0)
else:
M = (int(N / 1000) + 1) * 1000
print(int(M - N)) | [["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 50 |
import sys
rl = sys.stdin.buffer.readline
N = int(rl())
print(1000 - (N % 1000)) | #!/usr/bin/env python3
import sys
rl = sys.stdin.buffer.readline
N = int(rl())
print((1000 - (N % 1000)) % 1000) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 29 |
n=int(input())
x=0
while x<n:
x+=1000
print(n-x) | n=int(input())
x=0
while x<n:
x+=1000
print(x-n) | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 25 |
#include <iostream>
using namespace std;
int main() {
int price;
std::cin >> price;
std::cout << 1000 - price % 1000 << std::endl;
}
| #include <iostream>
using namespace std;
int main() {
int price;
std::cin >> price;
std::cout << (1000 - price % 1000) % 1000 << std::endl;
}
| [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 35 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int n;
cin >> n;
if (n >= 1000)
cout << 1000 - n % 1000;
else
cout << 0;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int n;
cin >> n;
if (n % 1000 != 0)
cout << 1000 - n % 1000;
else
cout << 0;
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 44 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0;
} else if (n > 1000) {
int x = n % 1000;
cout << 1000 - x;
} else {
cout << n % 1000;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0;
} else if (n > 1000) {
int x = n % 1000;
cout << 1000 - x;
} else {
cout << 1000 - n;
}
} | [["-", 0, 9, 0, 1, 0, 16, 12, 16, 31, 22], ["-", 0, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 0, 9, 0, 1, 0, 16, 12, 16, 17, 33], ["+", 0, 9, 0, 1, 0, 16, 12, 16, 12, 22]] | 1 | 64 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int bill = 1000;
int currAmount = 0;
while (currAmount <= N) {
currAmount += bill;
}
System.out.println(currAmount - N);
... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int bill = 1000;
int currAmount = 0;
while (currAmount < N) {
currAmount += bill;
}
System.out.println(currAmount - N);
... | [["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18]] | 3 | 84 |
#include "bits/stdc++.h"
using namespace std;
// wierd debugging stuff
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( ... |
#include "bits/stdc++.h"
using namespace std;
// wierd debugging stuff
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( ... | [["-", 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, 42, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 582 |
N = int(input("N:"))
sa = 10000 - N
ans = sa % 1000
print(ans) | N = int(input())
sa = 10000 - N
ans = sa % 1000
print(ans) | [["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 25 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define yn ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define yn ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 181 |
#include <bits/stdc++.h>
using namespace std;
// #include <bits/stdtr1c++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #pragma GCC optimize("Ofast,no-stack-protector")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nat... | #include <bits/stdc++.h>
using namespace std;
// #include <bits/stdtr1c++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #pragma GCC optimize("Ofast,no-stack-protector")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=nat... | [["-", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["-", 31, 16, 12, 2, 3, 4, 0, 23, 0, 24], ["-", 12, 2, 3, 4, 0, 23, 0, 16, 31, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["-", 31, 16, 12, 2, 3, 4, 0, 23, 0, 25], ["-", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 1,020 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
b = a / 1000;
c = a % 1000;
if (c != 0) {
b++;
b *= 1000;
}
printf("%d\n", b - a);
return 0;
}
| #include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
b = a / 1000;
c = a % 1000;
if (c != 0) {
b++;
}
b *= 1000;
printf("%d\n", b - a);
return 0;
}
| [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46]] | 0 | 67 |
S = 1e3
def main():
n = int(input())
r = n % S
if r == 0:
return int(r)
else:
return int(S - r)
if __name__ == '__main__':
# print(main())
main() | S = 1e3
def main():
n = int(input())
r = n % S
if r == 0:
return int(r)
else:
return int(S - r)
if __name__ == '__main__':
print(main())
# main() | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 51 |
n = int(input())
a = n%1000
b = 1000-a
if b==1000:
print(0)
else:
print(a) | n = int(input())
a = n%1000
b = 1000-a
if b==1000:
print(0)
else:
print(b) | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 33 |
N = input()
wrk = N[-3:]
if wrk ==0:
0
else:
print(1000-int(wrk))
| N = input()
wrk = N[-3:]
if int(wrk) == 0:
print(0)
else:
print(1000-int(wrk)) | [["+", 0, 656, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 30 |
#include <stdio.h>
int main() {
int N, payment;
scanf("%d", &N);
payment = 1000 - (N % 1000);
printf("%d\n", payment);
return 0;
}
| #include <stdio.h>
int main() {
int N, payment;
scanf("%d", &N);
payment = (1000 - N % 1000) % 1000;
printf("%d\n", payment);
return 0;
}
| [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 0 | 46 |
n = int(input())
print(1000 - n % 1000) | n = int(input())
print((1000 - n) % 1000) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 16 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = 0;
while (a * 1000 <= N) {
a++;
}
cout << a * 1000 - N << endl;
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = 0;
while (a * 1000 < N) {
a++;
}
cout << a * 1000 - N << endl;
} | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]] | 1 | 49 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N, a;
cin >> N;
for (int i = 0; i <= 10000; i += 1000) {
if (i > N) {
a = i - N;
cout << a << endl;
break;
}
}
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N, a;
cin >> N;
for (int i = 0; i <= 10000; i += 1000) {
if (i >= N) {
a = i - N;
cout << a << endl;
break;
}
}
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 65 |
n = int(input())
t = [0]*10001
for i in range(1,41):
t[6*i**2] += 1
for i in range(1,59):
for j in range(1,59):
if(i != j):
a = (i+j)**2 + 2*j**2
if(a <= 10000):
t[a] += 3
else:
break
for i in range(3,100):
for j in range(2,i):
... | n = int(input())
t = [0]*10001
for i in range(1,41):
t[6*i**2] += 1
for i in range(1,99):
for j in range(1,99):
if(i != j):
a = (i+j)**2 + 2*j**2
if(a <= 10000):
t[a] += 3
else:
break
for i in range(3,100):
for j in range(2,i):
... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 19]] | 5 | 187 |
#include <stdio.h>
int main() {
int n;
int i;
scanf("%d", &n);
int a[10001] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
3, 3, 0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0,
3, 3, 6, 0, 0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0,
... | #include <stdio.h>
int main() {
int n;
int i;
scanf("%d", &n);
int a[10003] = {
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
3, 3, 0, 0, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0,
3, 3, 6, 0, 0, 3, 0, 0, 0, 0, 3, 3, 6, 0, 6, 0,
... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 20,060 |
#include <stdio.h>
int tri(int X, int Y, int Z) {
int s, s2 = X + Y + Z, x, y, z;
if (s2 % 2)
return 0;
s = s2 / 2;
x = s - Y;
y = s - Z;
z = s - X;
if (x < 1 || y < 1 || z < 1)
return 0;
if (x != y) {
if (y == z || z == x) {
return 3;
} else {
return 6;
}
} else {
... | #include <stdio.h>
int tri(int X, int Y, int Z) {
int s, s2 = X + Y + Z, x, y, z;
if (s2 % 2)
return 0;
s = s2 / 2;
x = s - Y;
y = s - Z;
z = s - X;
if (x < 1 || y < 1 || z < 1)
return 0;
if (x != y) {
if (y == z || z == x) {
return 3;
} else {
return 6;
}
} else {
... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 0 | 361 |
import numpy as np
n = int(input())
max_n = int(n ** 0.5)
memo = np.zeros((max_n, max_n, max_n))
ans = [0]*(n+1)
for x in range(1, max_n):
for y in range(1, max_n):
for z in range(1, max_n):
s = x**2+y**2+z**2+x*y+y*z+z*x
if s <= n+1:
ans[s] += 1
for i in range(1... | import numpy as np
n = int(input())
max_n = int(n ** 0.5)
memo = np.zeros((max_n, max_n, max_n))
ans = [0]*(n+1)
for x in range(1, max_n):
for y in range(1, max_n):
for z in range(1, max_n):
s = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
if s < n+1:
ans[s] +=... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 132 |
from itertools import combinations_with_replacement
def f(N):
global table
for x, y, z in combinations_with_replacement(range(1, 100), 3):
n = x**2+y**2+z**2+x*y+y*z+z*x
if n>N:
continue
if x==y==z:
table[n] = 1
elif x==y or y==z or z==x:
table... | from itertools import combinations_with_replacement
def f(N):
global table
for x, y, z in combinations_with_replacement(range(1, 100), 3):
n = x**2+y**2+z**2+x*y+y*z+z*x
if n>N:
continue
if x==y==z:
table[n] += 1
elif x==y or y==z or z==x:
tabl... | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107], ["-", 75, 665, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 665, 64, 196, 0, 1, 0, 677, 17, 107], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 107]] | 5 | 147 |
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int ans = 0;
float lim = sqrt((float)2 / 3 * i);
int max = (int)(sqrt((float)2 * i));
int lim_up = (int)lim + 1;
if (lim == (float)((int)lim))
lim_up--;
for (i... | #include <cmath>
#include <cstdio>
using namespace std;
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
int ans = 0;
float lim = sqrt((float)2 / 3 * i);
int max = (int)(sqrt((float)2 * i));
int lim_up = (int)lim + 1;
if (lim == (float)((int)lim))
lim_up--;
for (i... | [["-", 0, 57, 75, 76, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 12, 13]] | 1 | 249 |
import sys
import numpy as np
N = int(input())
o = [0] * (N+1)
for i in range(1, 100):
for j in range(1, 100):
for k in range(1, 100):
n = int( ((i+j) * (j+k)) + i*i + k*k)
if n < (N+1):
o[n] += 1
if n > 1001:
break
for i in range(N):
... | import sys
import numpy as np
N = int(input())
o = [0] * (N+1)
for i in range(1, 100):
for j in range(1, 100):
for k in range(1, 100):
n = int( ((i+j) * (j+k)) + i*i + k*k)
if n < (N+1):
o[n] += 1
if n > 10001:
break
for i in range(N):
... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 119 |
#include <bits/stdc++.h>
#include <deque>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#include <set>
#define ws " "
#define nl "\n"
#define tc ... | #include <bits/stdc++.h>
#include <deque>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#include <set>
#define ws " "
#define nl "\n"
#define tc ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 894 |
N = int(input())
A = [0]*(N+1)
for x in range(1, 101):
for y in range(1, 101):
for z in range(1, 101):
i = x**2 + y**2 + z**2 + x*y + y*z + z*x
if i < N:
A[i] += 1
for i in range(1, N+1):
print(A[i]) | N = int(input())
A = [0]*(N+1)
for x in range(1, 101):
for y in range(1, 101):
for z in range(1, 101):
i = x**2 + y**2 + z**2 + x*y + y*z + z*x
if i < N+1:
A[i] += 1
for i in range(1, N+1):
print(A[i]) | [["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 104 |
N = int(input())
ans = [0]*(N+1)
RANGE = 333
for i in range(1, RANGE):
if i**2 <= N+1:
for j in range(1, RANGE):
if i**2 + j**2 + i*j <= N+1:
for k in range(1, RANGE):
wd = i**2 + j**2 + k**2 + i*j + j*k + k*i
if wd <= N+1:
#print(wd)
#print(i, j, k)
... | N = int(input())
ans = [0]*(N+1)
RANGE = 333
for i in range(1, RANGE):
if i**2 <= N+1:
for j in range(1, RANGE):
if i**2 + j**2 + i*j <= N+1:
for k in range(1, RANGE):
wd = i**2 + j**2 + k**2 + i*j + j*k + k*i
if wd < N+1:
#print(wd)
#print(i, j, k)
... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 146 |
N = int(input())
a = [0]* N
x = [i for i in range(1,43)]
y = [i for i in range(1,43)]
z = [i for i in range(1,43)]
ans = []
for i in x:
for j in y:
for k in z:
t = (i**2+j**2+k**2+i*j+j*k+k*i)
if t <= N:
a[t-1] += 1
for i in range(N):
print(a[i]) | N = int(input())
a = [0]* N
x = [i for i in range(1,101)]
y = [i for i in range(1,101)]
z = [i for i in range(1,101)]
ans = []
for i in x:
for j in y:
for k in z:
t = (i**2+j**2+k**2+i*j+j*k+k*i)
if t <= N:
a[t-1] += 1
for i in range(N):
print(a[i]) | [["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612]] | 5 | 131 |
#include <bits/stdc++.h>
using namespace std;
int n;
int ch(int i) {
int x = 0;
for (int j = 1; j <= i / 2; ++j) {
if (j * j + 2 * j > i)
break;
for (int k = 1; k <= i / 2; ++k) {
if (k * k + j * j + k * j > i)
break;
for (int l = 1; l <= i / 2; ++l) {
if (j * j + k * k + l... | #include <bits/stdc++.h>
using namespace std;
int n;
int ch(int i) {
int x = 0;
for (int j = 1; j <= i / 2; ++j) {
if (j * j + 2 * j > i)
break;
for (int k = 1; k <= i / 2; ++k) {
if (k * k + j * j + k * j > i)
break;
for (int l = 1; l <= i / 2; ++l) {
if (j * j + k * k + l... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 213 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, x, y, z, ans;
cin >> N;
x = 1;
y = 1;
z = 1;
for (long long i = 1; i <= N; i++) {
ans = 0;
for (long long j = x; j < 51; j++) {
for (long long k = y; k < 51; k++) {
for (long long l = z; l < 51; l++) {
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, x, y, z, ans;
cin >> N;
x = 1;
y = 1;
z = 1;
for (long long i = 1; i <= N; i++) {
ans = 0;
for (long long j = x; j < 101; j++) {
for (long long k = y; k < 101; k++) {
for (long long l = z; l < 101; l++) {
... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 237 |
N = int(input())
cs = [0]*N
for i in range(1,130):
for j in range(1,130):
for k in range(1,130):
temp = i**2 + j**2 + k**2 + i*j + j*k + k*i
if temp < N and temp > 0:
cs[temp-1] += 1
for i in range(N):
print(cs[i]) | N = int(input())
cs = [0]*N
for i in range(1,130):
for j in range(1,130):
for k in range(1,130):
temp = i**2 + j**2 + k**2 + i*j + j*k + k*i
if temp <= N and temp > 0:
cs[temp-1] += 1
for i in range(N):
print(cs[i])
| [["-", 8, 196, 0, 57, 15, 679, 31, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 19]] | 5 | 102 |
def main():
N = int(input())
f = [0] * (N+1)
for x in range(1, 41):
for y in range(x, 42):
for z in range(y, 42):
if (ans := (x+y+z)**2 - x*y - y*z - z*x) in range(1, N+1):
count = 0
if x == y and y == z:
c... | def main():
N = int(input())
f = [0] * (N+1)
for x in range(1, 100):
for y in range(x, 100):
for z in range(y, 100):
if (ans := (x+y+z)**2 - x*y - y*z - z*x) in range(1, N+1):
count = 0
if x == y and y == z:
... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 247 |
N = int(input())
DP = [0]*(N+1)
for x in range(1,round(N**0.5)):
for y in range(1,round(N**0.5)):
for z in range(1,round(N**0.5)):
hoge = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
if hoge <= N:
DP[hoge] += 1
else:
break
for i in ... | N = int(input())
DP = [0]*(N+1)
for x in range(1,round(N**0.5)):
for y in range(1,round(N**0.5)):
for z in range(1,round(N**0.5)):
hoge = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
if hoge <= N:
DP[hoge] += 1
else:
break
for i in ... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 120 |
N = int(input().strip())
x, y, z = 1, 1, 1
f = [0] * (N + 1)
# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, axis="xyz"):
# print(x, y, z)
n = x**2 + y**2 + z**2 + x*y + y*z + x*z
if n <= N:
f[n] += 1
if axis == "xyz":
f = calc(x+1, y, z, f, axis="xyz"... | N = int(input().strip())
x, y, z = 1, 1, 1
f = [0] * (N + 1)
# while x**2 + y**2 + z**2 + x*y + y*z + x*z <= N:
def calc(x, y, z, f, axis="xyz"):
# print(x, y, z)
n = x**2 + y**2 + z**2 + x*y + y*z + x*z
if n <= N:
f[n] += 1
if axis == "xyz":
f = calc(x+1, y, z, f, axis="xyz"... | [["-", 12, 652, 3, 4, 0, 653, 51, 557, 0, 6], ["+", 12, 652, 3, 4, 0, 653, 51, 557, 0, 6]] | 5 | 266 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[1005] = {0};
int main() {
ll num;
cin >> num;
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
ll ans = i * i + j * j + k * k + i * j + i * k + j * k;
if (ans <= 1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[10005] = {0};
int main() {
ll num;
cin >> num;
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
for (int k = 1; k <= 100; k++) {
ll ans = i * i + j * j + k * k + i * j + i * k + j * k;
if (ans <= ... | [["-", 0, 30, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 149 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.