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 <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << n % 1000 << endl;
}
| #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (10000 - n) % 1000 << endl;
}
| [["+", 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], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 27 |
N = int(input())
rest = N//1000
if rest==0:
print(0)
else:
print(1000-rest) | N = int(input())
rest = N%1000
if rest==0:
print(0)
else:
print(1000-rest)
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109]] | 5 | 30 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int n;
int main() {
cin >> n;
cout << 1000 - (n - n / 1000 * 1000);
} | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int n;
int main() {
cin >> n;
cout << (1000 - (n - n / 1000 * 1000)) % 1000;
} | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 39 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
typedef long long ll;
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = N / 1000;
int ans;
ans = (a + 1) * 1000 - N;
if (N % 1000 == 0)
cout << 0 << endl;
cout << ans << endl;
} | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
typedef long long ll;
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = N / 1000;
int ans;
ans = (a + 1) * 1000 - N;
if (N % 1000 == 0)
cout << 0 << endl;
else {
cout << ans << endl;
}
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 74 |
// 27DTG
// 04072020
#include <bits/stdc++.h>
using namespace std;
#define bolt \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | // 27DTG
// 04072020
#include <bits/stdc++.h>
using namespace std;
#define bolt \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | [["+", 51, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 51, 2, 3, 4, 0, 16, 31, 16, 17, 48]] | 1 | 87 |
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
N = (1000 - N % 1000);
printf("%d", N);
return 0;
}
| #include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
N = (1000 - N % 1000) % 1000;
printf("%d", N);
return 0;
}
| [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 0 | 44 |
#include <iostream>
#define s system("pause")
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0 << endl;
} else if (n > 1000) {
for (int i = 0; i < 10; i++) {
if (i * 1000 > n) {
cout << (i * 1000) - n << endl;
break;
}
}
}
s;
} | #include <iostream>
#define s system("pause")
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0 << endl;
} else if (n % 1000 > 0) {
for (int i = 0; i < 100; i++) {
if (i * 1000 > n) {
cout << (i * 1000) - n << endl;
break;
}
}
}
s;
} | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13]] | 1 | 89 |
x=int(input())
from math import ceil
x=ceil(x/1000)*1000
print(x) | x=int(input())
from math import ceil
u=ceil(x/1000)*1000
print(u-x) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 26 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
n - (1000 - n % 1000) % 1000;
printf("%d", n);
return 0;
} | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
n = (1000 - n % 1000) % 1000;
printf("%d", n);
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 33], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 0 | 45 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define fr(i, n, m) for (ll i = n; i < m; i++)
int main() {
ll n;
scanf("%lli", &n);
if (!n % 1000) {
printf("%i", 0);
} else {
printf("%lli", 1000 - n % 1000);
}
return 0;
} | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define fr(i, n, m) for (ll i = n; i < m; i++)
int main() {
ll n;
scanf("%lli", &n);
if (n % 1000 == 0) {
printf("%i", 0);
} else {
printf("%lli", 1000 - n % 1000);
}
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 31, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 75 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long double pi = 3.14159265358979323846;
#define x first
#define y second
#define deb(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long double pi = 3.14159265358979323846;
#define x first
#define y second
#define deb(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << " : " ... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 16, 12, 23, 0, 25], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13]] | 1 | 454 |
n = int(input())
print((n-(n%1000))%1000) | n = int(input())
print((1000-(n%1000))%1000) | [["-", 3, 4, 0, 657, 31, 23, 0, 657, 31, 22], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 31, 612]] | 5 | 22 |
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | [["-", 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 | 547 |
#include <bits/stdc++.h>
#define int long long
#define vc vector<char>
#define vi vector<int>
#define vs vector<string>
#define si set<int>
#define pii pair<int, int>
#define SORT(c) sort(c.begin(), c.end())
#define SORTC(c, cmp) sort(c.begin(), c.end(), cmp)
#define mapii map<int, int>
#define pb push_back
#define F ... | #include <bits/stdc++.h>
#define int long long
#define vc vector<char>
#define vi vector<int>
#define vs vector<string>
#define si set<int>
#define pii pair<int, int>
#define SORT(c) sort(c.begin(), c.end())
#define SORTC(c, cmp) sort(c.begin(), c.end(), cmp)
#define mapii map<int, int>
#define pb push_back
#define F ... | [["+", 12, 16, 12, 23, 0, 41, 15, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]] | 1 | 178 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = N % 1000;
if (ans = !0) {
cout << 1000 - ans << endl;
} else {
cout << 0 << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = N % 1000;
if (ans != 0) {
cout << 1000 - ans << endl;
} else {
cout << 0 << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["-", 0, 57, 15, 339, 51, 11, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 54 |
n=int(input())
if n%1909==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, 12, 612], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 29 |
#include <cmath>
#include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
int num = ceil((double)(N) / 1000);
cout << N - 1000 * num << endl;
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
int num = ceil((double)(N) / 1000.0);
cout << 1000 * num - N << endl;
return 0;
} | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 50 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int Inf = 1e9 + 5;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
int n;
cin >> n;
cout << n % 1000;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int Inf = 1e9 + 5;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000;
return 0;
} | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 56 |
#include <bits/stdc++.h>
#include <cstring>
//#define Mfc_Tanzim
#define ll long long
#define ull unsigned long long
#define pb push_back
#define ff first
#define ss second
#define all(v) (v.begin(), v.end())
#define pi acos(-1.0)
#define FastRead \
ios_ba... | #include <bits/stdc++.h>
#include <cstring>
//#define Mfc_Tanzim
#define ll long long
#define ull unsigned long long
#define pb push_back
#define ff first
#define ss second
#define all(v) (v.begin(), v.end())
#define pi acos(-1.0)
#define FastRead \
ios_ba... | [["+", 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 | 120 |
#include <bits/stdc++.h>
using namespace std;
#define FAST_IO \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb pu... | #include <bits/stdc++.h>
using namespace std;
#define FAST_IO \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb pu... | [["+", 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 | 47 |
#include <iostream>
#include <queue>
#include <vector>
#define endl '\n'
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
cout << (n - n % 1000) % n;
return 0;
}
| #include <iostream>
#include <queue>
#include <vector>
#define endl '\n'
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000;
return 0;
}
| [["-", 0, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 55 |
// AtCoder template
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
cout << (n + 1000) / 1000 * 1000 - n << endl;
} | // AtCoder template
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
cout << (n + 1000 - 1) / 1000 * 1000 - n << endl;
} | [["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13]] | 1 | 63 |
#include <stdio.h>
int main(void) {
int m;
char str[6];
fgets(str, sizeof(str), stdin);
sscanf(str, "%d", &m);
printf("%d", (int)(1000 - m % 1000));
return 0;
}
| #include <stdio.h>
int main(void) {
int m;
char str[6];
fgets(str, sizeof(str), stdin);
sscanf(str, "%d", &m);
printf("%d", (int)(1000 - m % 1000) % 1000);
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 63 |
n = input()
n_l = int(n[1:])
if n_l==0:
print(0)
else:
print(1000-n_l) | n = input()
n_l = int(n[-3:])
if n_l==0:
print(0)
else:
print(1000-n_l) | [["-", 12, 652, 3, 4, 0, 206, 206, 663, 0, 612], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 28, 612]] | 5 | 32 |
#include <cstdio>
int main() {
int n;
scanf("%d", &n);
printf("%d", (n % 1000));
return 0;
}
| #include <cstdio>
int main() {
int n;
scanf("%d", &n);
printf("%d", (1000 - n % 1000) % 1000);
return 0;
}
| [["+", 3, 4, 0, 16, 31, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 37 |
#include <iostream>
using namespace std;
int change(int N) {
int x = N % 1000;
if (x <= 500)
return x;
else
return (1000 - x);
}
int main() {
int N;
cin >> N;
cout << change(N);
} | #include <iostream>
using namespace std;
int change(int N) {
int x = N % 1000;
if (x == 0)
return 0;
else
return (1000 - x);
}
int main() {
int N;
cin >> N;
cout << change(N);
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 64, 37, 0, 22], ["+", 0, 14, 8, 9, 0, 57, 64, 37, 0, 13]] | 1 | 58 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n >= 0) {
n -= 1000;
}
System.out.println(Math.abs(n));
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n > 0) {
n -= 1000;
}
System.out.println(Math.abs(n));
}
} | [["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 47]] | 3 | 70 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
n = n % 1000;
if (n > 500)
n = 1000 - n;
cout << n << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
n = n % 1000;
if (n != 0)
n = 1000 - n;
cout << n << endl;
} | [["-", 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]] | 1 | 43 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
N := getStdinInt()
if N % 1000 == 0 {
fmt.Printf("%b", 0)
} else {
fmt.Printf("%b", 1000-N%1000)
}
}
var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
func getStdin() string {
return readLine()
}
func getStdinInt() int... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
N := getStdinInt()
if N % 1000 == 0 {
fmt.Printf("%d", 0)
} else {
fmt.Printf("%d", 1000-N%1000)
}
}
var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
func getStdin() string {
return readLine()
}
func getStdinInt() int... | [] | 7 | 501 |
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
n %= 1000
if n==0:
print(0)
else:
print(1000-n) | import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
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, 31, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 117 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define all(v) v.begin(), v.end()
const ll mod = 1000000007;
ll countBits(ll in) {
int res = 0;
for (; in > 0; in >>= 1) {
if ((in & 0x01) != 0) {
res++;
}
}
return res;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define all(v) v.begin(), v.end()
const ll mod = 1000000007;
ll countBits(ll in) {
int res = 0;
for (; in > 0; in >>= 1) {
if ((in & 0x01) != 0) {
res++;
}
}
return res;... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 537 |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define Mp make_pair
#define pb push_back
using ll = long long;
using db = double;
using pii = pair<int, int>;
using vi = vector<int>;
signed main() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
fprintf(stderr, "time=%.4f\n... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define Mp make_pair
#define pb push_back
using ll = long long;
using db = double;
using pii = pair<int, int>;
using vi = vector<int>;
signed main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
fprintf(stderr, "ti... | [["+", 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 | 93 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, A;
cin >> N;
M = (N / 1000) + 1;
A = (M * 1000) - N;
if (A = 1000) {
cout << 0 << endl;
} else {
cout << A << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, A;
cin >> N;
M = (N / 1000) + 1;
A = (M * 1000) - N;
if (A == 1000) {
cout << 0 << endl;
} else {
cout << A << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 66 |
#include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
for (; N > 1000; N -= 1000) {
;
}
cout << N << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int N;
cin >> N;
for (; N > 0; N -= 1000) {
;
}
cout << abs(N) << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 43 |
#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
cout << (-n) % 1000 + 1000;
} | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
cout << ((-n) % 1000 + 1000) % 1000;
} | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109]] | 1 | 30 |
#include <bits/stdc++.h>
#include <iostream>
#include <unordered_map>
#include <vector>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll q = n / 1000;
ll r = q % 1000;
if (r == 0)
cout << 0 << endl;
else
cout << (q + 1) * 1000 - n << endl;
return 0;
}
| #include <bits/stdc++.h>
#include <iostream>
#include <unordered_map>
#include <vector>
#define ll long long
using namespace std;
int main() {
ll n;
cin >> n;
ll q = n / 1000;
ll r = n % 1000;
if (r == 0)
cout << 0 << endl;
else
cout << (q + 1) * 1000 - n << endl;
return 0;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22]] | 1 | 72 |
#include <cstdio>
#include <iostream>
using namespace std;
int n;
int main() {
scanf("%d", &n);
if (n % 1000)
cout << 1000 - n % 1000 << endl;
cout << 0 << endl;
} | #include <cstdio>
#include <iostream>
using namespace std;
int n;
int main() {
scanf("%d", &n);
if (n % 1000)
cout << 1000 - n % 1000 << endl;
else
cout << 0 << endl;
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 49 |
N = input()
R = N % 1000
if R == 0:
print(0)
else:
print(abs(R-1000)) | N = int(input())
R = N % 1000
if R == 0:
print(0)
else:
print(abs(R-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 | 30 |
#include <bits/stdc++.h>
#define ll long long
#define all(x) begin(x), end(x)
#define range(x) begin(x), begin(x)
#define what(x) cout << #x << ": " << x << '\n'
#define print(x) \
for (auto &el : x) ... | #include <bits/stdc++.h>
#define ll long long
#define all(x) begin(x), end(x)
#define range(x) begin(x), begin(x)
#define what(x) cout << #x << ": " << x << '\n'
#define print(x) \
for (auto &el : x) ... | [["+", 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 | 134 |
N = int(input())
d = N % 1000
if 1000 - d == 0:
print(0)
else:
print(1000 - d) | N = int(input())
d = N % 1000
if 1000 - d == 0 or d == 0:
print(0)
else:
print(1000 - d) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 32 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, S, T;
cin >> N;
S = N / 1000;
T = (S + 1) * 1000 - N;
if (T == 1000) {
cout << "0" << endl;
} else {
cout << N << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, S, T;
cin >> N;
S = N / 1000;
T = (S + 1) * 1000 - N;
if (T == 1000) {
cout << "0" << endl;
} else {
cout << T << endl;
}
} | [["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 66 |
#include <iostream>
using namespace std;
int main() {
// insert code here...
int n;
cin >> n;
int i;
for (i = 0; 1000 * i < n; i++)
;
cout << n - i * 1000 << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
// insert code here...
int n;
cin >> n;
int i;
for (i = 0; 1000 * i < n; i++)
;
cout << i * 1000 - n << endl;
return 0;
} | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 52 |
// author-Shivam gupta
#include <bits/stdc++.h>
using namespace std;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define IN(A, B, C) assert(B <= A && A <= C)
#define MP make_pair
#define FOR(i, a) for (int i = 0; i < a; i++)
#define FOR1(i, j... |
// author-Shivam gupta
#include <bits/stdc++.h>
using namespace std;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define IN(A, B, C) assert(B <= A && A <= C)
#define MP make_pair
#define FOR(i, a) for (int i = 0; i < a; i++)
#define FOR1(i, j... | [["-", 8, 9, 0, 1, 0, 16, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 148 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b);
int main() {
cin.tie(0);
int n;
cin >> n;
cout << 1000 - (n % 1000);
return 0;
}
ll gcd(ll a, ll b) {
if (a % b == 0) {
return (b);
} else {
retur... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b);
int main() {
cin.tie(0);
int n;
cin >> n;
cout << (1000 - (n % 1000)) % 1000;
return 0;
}
ll gcd(ll a, ll b) {
if (a % b == 0) {
return (b);
} else {
... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 102 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const int N = 1000 + 10;
int main() {
int n;
cin >> n;
int sum = n % 1000;
cout << (1000 - n) << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const int N = 1000 + 10;
int main() {
int n;
cin >> n;
int sum = n % 1000;
cout << (1000 - sum) % 1000 << endl;
return 0;
} | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 66 |
#include <stdio.h>
int main(void) {
int n, n1, n2, change;
if (((scanf("%d", &n)) != 1) || ((n <= 0 || 10000 <= n))) {
return -1;
}
if (n % 1000 == 0) {
printf("0");
} else {
n1 = n / 1000;
n2 = (n1 + 1) * 1000;
change = n2 - n;
printf("%d", change);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int n, n1, n2, change;
if (((scanf("%d", &n)) != 1) || ((n < 0 || 10000 < n))) {
return -1;
}
if (n % 1000 == 0) {
printf("0");
} else {
n1 = n / 1000;
n2 = (n1 + 1) * 1000;
change = n2 - n;
printf("%d", change);
}
return 0;
}
| [["-", 12, 23, 0, 23, 0, 16, 31, 16, 17, 19], ["+", 12, 23, 0, 23, 0, 16, 31, 16, 17, 18], ["-", 12, 23, 0, 23, 0, 16, 12, 16, 17, 19], ["+", 12, 23, 0, 23, 0, 16, 12, 16, 17, 18]] | 0 | 107 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, i, ans;
cin >> N;
if (N == 0) {
cout << 0 << endl;
return 0;
}
if (N == 10000) {
cout << 0 << endl;
return 0;
}
int j = N / 1000;
i = (j + 1) * 1000;
ans = i - N;
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, i, ans;
cin >> N;
if (N == 0) {
cout << 0 << endl;
return 0;
}
if (N % 1000 == 0) {
cout << 0 << endl;
return 0;
}
int j = N / 1000;
i = (j + 1) * 1000;
ans = i - N;
cout << ans << endl;
return 0;
} | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 89 |
#include <iostream>
int main() {
int n = 0;
std::cin >> n;
auto y = (n % 1000);
if (y > 0) {
std::cout << y;
} else {
std::cout << 0;
}
} | #include <iostream>
int main() {
int n = 0;
std::cin >> n;
auto y = (n % 1000);
if (y > 0) {
std::cout << 1000 - y;
} else {
std::cout << 0;
}
} | [["+", 64, 9, 0, 1, 0, 16, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 16, 12, 16, 17, 33]] | 1 | 51 |
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)) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 31 |
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re
N=int(input())
ans = 1000 - (N%1000)
print(ans)
| import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re
N=int(input())
ans = (1000 - (N%1000)) % 1000
print(ans)
| [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 12, 657, 31, 23, 0, 657, 12, 23, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 37 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
for (int i = 0; i <= n; i++) {
if ((n + i) % 1000 == 0) {
sum = i;
break;
}
}
cout << sum;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
for (int i = 0; i <= 999; i++) {
if ((n + i) % 1000 == 0) {
sum = i;
break;
}
}
cout << sum;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 63 |
#include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int m = N / 1000;
if (N % 1000 == 0) {
m = 1000 * m;
}
m = 1000 * (m + 1);
int ans = m - N;
printf("%d", ans);
return 0;
} | #include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int m = N / 1000;
if (N % 1000 == 0) {
m = 1000 * m;
} else
m = 1000 * (m + 1);
int ans = m - N;
printf("%d", ans);
return 0;
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 0 | 74 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// スペース区切りの整数の入力
int kazu = sc.nextInt();
if (1000 - (kazu % 1000) != 0) {
System.out.println(1000 - (kazu % 1000));
} else {
System.out.println(0);
}
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// スペース区切りの整数の入力
int kazu = sc.nextInt();
if (1000 - (kazu % 1000) != 1000) {
System.out.println(1000 - (kazu % 1000));
} else {
System.out.println(0);
}
}
} | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]] | 3 | 86 |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int pay = 0;
while (pay >= n) {
pay += 1000;
}
n = pay - n;
System.out.println(n);
}
} | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int pay = 0;
while (pay < n) {
pay += 1000;
}
n = pay - n;
System.out.println(n);
}
} | [["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18]] | 3 | 83 |
n = int(input)
if n % 1000 == 0:
print("0")
exit()
print(1000 - (n % 1000)) | n = int(input())
if n % 1000 == 0:
print("0")
exit()
print(1000 - (n % 1000)) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 32 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = N;
while (ans >= 0) {
ans -= 1000;
}
ans += 1000;
cout << ans;
return 0;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int ans;
ans = N;
while (ans > 0) {
ans -= 1000;
}
ans *= (-1);
cout << ans;
return 0;
} | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 13], ["+", 8, 9, 0, 1, 0, 1... | 1 | 51 |
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
n = n % 1000;
if (n != 0)
n -= 1000;
printf("%d\n", n);
return 0;
} | #include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
n = n % 1000;
if (n != 0)
n = 1000 - n;
printf("%d\n", n);
return 0;
} | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]] | 1 | 51 |
N = int(input())
a = 0
if N >= 1000:
a = N - 1000
else:
a = a
while a >= 1000:
a = a - 1000
if a != 0:
a = 1000 - a
print(a) | N = int(input())
a = 0
if N >= 1000:
a = N - 1000
else:
a = N
while a >= 1000:
a = a - 1000
if a != 0:
a = 1000 - a
print(a) | [["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 22]] | 5 | 50 |
#include <bits/stdc++.h>
typedef long long ll;
#define IO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl '... | #include <bits/stdc++.h>
typedef long long ll;
#define IO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl '... | [["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33]] | 1 | 69 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = N % 1000;
int b;
if (a == 1000) {
cout << 0 << endl;
} else {
cout << 1000 - a << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a;
a = N % 1000;
int b;
if (a == 0) {
cout << 0 << endl;
} else {
cout << 1000 - a << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 56 |
print('N')
x=int(input())
x=1000-x%1000
if(x==1000):
x=0
print(x) | x=int(input())
x=1000-x%1000
if(x==1000):
x=0
print(x) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 35 |
#include <bits/stdc++.h>
#include <cmath>
using ll = long long;
using namespace std;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define mins(x, y) x = min(x, y)
#define maxs(... | #include <bits/stdc++.h>
#include <cmath>
using ll = long long;
using namespace std;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define mins(x, y) x = min(x, y)
#define maxs(... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 241 |
n = int(input())
print(1000 - 1000 % n if n % 1000 > 0 else 0) | n = int(input())
print(1000 - n % 1000 if n % 1000 > 0 else 0) | [["-", 3, 4, 0, 41, 0, 657, 12, 657, 31, 612], ["-", 3, 4, 0, 41, 0, 657, 12, 657, 17, 109], ["+", 3, 4, 0, 41, 0, 657, 12, 657, 17, 109], ["+", 3, 4, 0, 41, 0, 657, 12, 657, 12, 612]] | 5 | 24 |
N = input()
ans = int(N[1:4])
ans = 1000 - ans
if ans == 1000:
print(0)
else:
print(ans) | N = input()
ans = int(N[-3:])
ans = 1000 - ans
if ans == 1000:
print(0)
else:
print(ans) | [["-", 12, 652, 3, 4, 0, 206, 206, 663, 0, 612], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 28, 612]] | 5 | 36 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 1000 == 0)
cout << 0 << endl;
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, 57, 75, 76, 0, 95]] | 1 | 46 |
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
int x = N / 1000 + 1;
cout << x * 1000 - N;
} | #include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
int x = (N + 999) / 1000;
cout << x * 1000 - N;
} | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 38 |
N = int(input())
ans = 0
if N > 1000:
if N % 1000 == 0:
ans = 0
else:
ans = 1000 - (N % 1000)
print(ans) | N = int(input())
ans = 0
if N % 1000 == 0:
ans = 0
else:
ans = 1000 - (N % 1000)
print(ans) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102], ["-", 0, 656, 0, 57, 64, 196, 0, 57, 0, 121], ["-", 64, 196, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 41 |
#include <bits/stdc++.h>
using namespace std;
int amount;
int main() {
cin >> amount;
if (amount % 1000 == 0) {
cout << 0;
}
cout << (1000 - amount % 1000);
} | #include <bits/stdc++.h>
using namespace std;
int amount;
int main() {
cin >> amount;
if (amount % 1000 == 0) {
cout << 0 << endl;
} else
cout << (1000 - amount % 1000);
}
| [["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 43 |
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define vso(x) sort(x.begin(), x.end())
#define vre(x) reverse(x.begin(), x.end());
#define aso(x) sort(x, x + x.size())
#define are(x) reverse(x, x + x.size())
#define print(x) cout << x << endl... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define vso(x) sort(x.begin(), x.end())
#define vre(x) reverse(x.begin(), x.end());
#define aso(x) sort(x, x + x.size())
#define are(x) reverse(x, x + x.size())
#define print(x) cout << x << endl... | [["+", 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 | 128 |
t=int(input())
m=0
while 1000*m<t:
m=m+1
c=1000*m-t
print(t) | t=int(input())
m=0
while 1000*m<t:
m=m+1
c=1000*m-t
print(c) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 34 |
n=int(input())
m=n//1000
if n%1000==0:
print(n//1000)
else:
print(((m+1)*1000)-n) | n=int(input())
m=n//1000
if n%1000==0:
print(0)
else:
print(((m+1)*1000)-n) | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 676], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 42 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> VI;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> VI;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33]] | 1 | 191 |
#include <algorithm>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
class Change {
public:
int getChange(int n) { return n % 1000; }
};
int main(int argc, const char *argv[]) {
Change c;
string nLn;
... | #include <algorithm>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
class Change {
public:
int getChange(int n) { return (1000 - n % 1000) % 1000; }
};
int main(int argc, const char *argv[]) {
Change c... | [["+", 8, 9, 0, 37, 0, 16, 31, 23, 0, 24], ["+", 0, 37, 0, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 37, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 37, 0, 16, 31, 23, 0, 25]] | 1 | 99 |
#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 << (100000 - n) % 1000 << endl;
return 0;
} | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 16, 31, 16, 12, 23, 0, 25]] | 1 | 34 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
for (int i = 0; i <= a; i++) {
if ((a + i) % 1000 == 0) {
System.out.println(i);
System.exit(0);
}
}
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
for (int i = 0; i < 1000; i++) {
if ((a + i) % 1000 == 0) {
System.out.println(i);
System.exit(0);
}
}
}
}
| [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]] | 3 | 90 |
N=int(input())
an=N//1000
ans=(an+1)*1000-N
if an==0:
print(0)
else:
print(ans) | N=int(input())
an=N//1000
ans=(an+1)*1000-N
if N%1000==0:
print(0)
else:
print(ans) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 39 |
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define uint unsigned int
#define alloc(n, type) (type *)calloc(n, sizeof(type))
#define MODULE 1
#define RAND(min, max) (rand() % (max -... | #include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define uint unsigned int
#define alloc(n, type) (type *)calloc(n, sizeof(type))
#define MODULE 1
#define RAND(min, max) (rand() % (max -... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 631 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
cout << n % 1000 << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
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 | 43 |
ma = 1000
given = int(input())
c = given%ma
if(c == 0):
print(0)
else:
print(c-1000) | ma = 1000
given = int(input())
c = given%ma
if(c == 0):
print(0)
else:
print(abs((c-1000))) | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 23, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 23, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 35 |
/*
NAME : RISHABH SINGH
INSTITUTION : DELHI TECHNOLOGICAL UNIVERSITY
*/
#include "bits/stdc++.h"
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define int long long
#define pii pair<int, int>
#define bi __builtin_inf()
#define ll long ... | /*
NAME : RISHABH SINGH
INSTITUTION : DELHI TECHNOLOGICAL UNIVERSITY
*/
#include "bits/stdc++.h"
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define int long long
#define pii pair<int, int>
#define bi __builtin_inf()
#define ll long ... | [["-", 64, 9, 0, 1, 0, 16, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 16, 12, 16, 31, 13]] | 1 | 324 |
#include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
b = (a / 1000) + 1;
c = (b * 1000) - a;
if (c = 1000) {
printf("0");
} else {
printf("%d", c);
}
return 0;
}
| #include <stdio.h>
int main() {
int a, b, c;
scanf("%d", &a);
b = (a / 1000) + 1;
c = (b * 1000) - a;
if (c == 1000) {
printf("0");
} else {
printf("%d", c);
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]] | 0 | 75 |
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
void solve() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
return;
};
};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
Solution solution;
solution.solve();
return 0;
} | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
void solve() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
return;
};
};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
Solution solution;
solution.solve();
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 | 71 |
#include <bits/stdc++.h>
using namespace std;
void solve(std::istream &in, std::ostream &out);
int main() {
#ifdef LOCAL
freopen("../IO/a.in", "r", stdin);
// freopen("../IO/a.out", "w", stdout);
#else
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
#endif
solve(std::c... | #include <bits/stdc++.h>
using namespace std;
void solve(std::istream &in, std::ostream &out);
int main() {
#ifdef LOCAL
freopen("../IO/a.in", "r", stdin);
// freopen("../IO/a.out", "w", stdout);
#else
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
#endif
solve(std::c... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 133 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = n % 1000;
System.out.println("" + ans);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = (10000 - n) % 1000;
System.out.println("" + ans);
}
} | [["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 24], ["+", 49, 200, 51, 16, 31, 23, 0, 16, 31, 499], ["+", 49, 200, 51, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 25]] | 3 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
if (a % 1000 == 0)
cout << 0;
else
cout << 1000 - a % 1000;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
if (a % 1000 == 0)
cout << 0;
else
cout << 1000 - a % 1000;
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 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 1000 == 0)
cout << 0;
cout << 1000 - N % 1000;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
if (N % 1000 == 0) {
cout << 0;
} else {
cout << 1000 - N % 1000;
}
return 0;
} | [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 42 |
<?php
$N = trim(fgets(STDIN));
$money = 0;
if($money<$N){
$money + 1000;
}
echo($money - $N);
?> | <?php
$N = trim(fgets(STDIN));
$money = 0;
while($money<$N){
$money = $money + 1000;
}
echo($money - $N); | [["-", 36, 36, 36, 36, 0, 493, 0, 57, 0, 121], ["+", 36, 36, 36, 36, 0, 493, 0, 52, 0, 89], ["+", 8, 9, 0, 1, 0, 11, 31, 606, 0, 607], ["+", 8, 9, 0, 1, 0, 11, 31, 606, 0, 141], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 0, 32], ["-", 36, 36, 36, 36, 36, 36, 0, 493, 0, 611]] | 6 | 42 |
//
// main.c
// Payment
//
// Created by k19031kk on 2020/07/05.
// Copyright © 2020 AIT. All rights reserved.
//
#include <stdio.h>
int main(int argc, const char *argv[]) {
int yen, count = 0, sum = 0;
scanf("%d", ¥);
if (yen < 0 || yen > 10000) {
return 0;
}
while (1) {
sum = (1000 * coun... | //
// main.c
// Payment
//
// Created by k19031kk on 2020/07/05.
// Copyright © 2020 AIT. All rights reserved.
//
#include <stdio.h>
int main(int argc, const char *argv[]) {
int yen, count = 0, sum = 0;
scanf("%d", ¥);
if (yen < 0 || yen > 10000) {
return 0;
}
while (1) {
sum = (1000 * coun... | [["-", 15, 23, 0, 16, 12, 23, 0, 16, 17, 47], ["+", 15, 23, 0, 16, 12, 23, 0, 16, 17, 20]] | 0 | 110 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if (n % 1000)
cout << n - n % 1000;
else
cout << 0;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if (n % 1000)
cout << 1000 - n % 1000;
else
cout << 0;
return 0;
} | [["-", 0, 57, 64, 1, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 64, 1, 0, 16, 12, 16, 31, 13]] | 1 | 55 |
#include <stdio.h>
int main(void) {
int N, money;
scanf("%d", &N);
if (N == 1000 || N == 0)
printf("0");
else {
money = 1000 - (N % 1000);
printf("%d", money);
}
return 0;
} | #include <stdio.h>
int main(void) {
int N, money;
scanf("%d", &N);
if (N % 1000 == 0)
printf("0");
else {
money = 1000 - (N % 1000);
printf("%d", money);
}
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 31, 22]] | 0 | 66 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
n = 1000 - (n % 1000);
if (n == 1000)
n = 0;
cout << 1000 - (n % 1000);
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
n = 1000 - (n % 1000);
if (n == 1000)
n = 0;
cout << n;
return 0;
} | [["-", 8, 9, 0, 1, 0, 16, 12, 16, 31, 13], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33], ["-", 0, 1, 0, 16, 12, 16, 12, 23, 0, 24], ["-", 0, 16, 12, 16, 12, 23, 0, 16, 17, 109], ["-", 0, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]] | 1 | 52 |
import math
A = int(input())
print(math.ceil(A/1000)) | import math
A = int(input())
print(math.ceil(A/1000)*1000-A) | [["+", 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 | 21 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template <class T> constexp... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template <class T> constexp... | [["+", 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 | 98 |
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
fr... | import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
fr... | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 106 |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 101;
int a[N][N];
int main() {
int n;
cin >> n;
while (n >= 1000) {
n -= 1000;
}
cout << n << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 101;
int a[N][N];
int main() {
int n;
cin >> n;
while (n > 0) {
n -= 1000;
}
cout << -n << endl;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 91, 17, 33]] | 1 | 57 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
if (n % 1000 == 0)
printf("0\n"); // return 0;
else
printf("%d\n", n % 1000);
return 0;
} | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
if (n % 1000 == 0)
printf("0\n"); // return 0;
else
printf("%d\n", 1000 - n % 1000);
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 0 | 54 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int r = a % 1000;
int s = 1000 - r;
if (s == 1000) {
System.out.println("0");
}
System.out.println(s);
}
}
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int r = a % 1000;
int s = 1000 - r;
if (s == 1000) {
System.out.println("0");
} else {
System.out.println(s);
}
}
}
| [["+", 8, 498, 0, 195, 8, 196, 0, 57, 0, 95], ["+", 0, 195, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 195, 8, 196, 0, 57, 75, 196, 0, 46]] | 3 | 86 |
import math
n = int(input())
math.ceil(n/1000)*1000 - n | import math
n = int(input())
print(math.ceil(n/1000)*1000 - n) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 22 |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define pii pair<ll, ll>
#define vi vector<ll>
#define vii vector<pi... | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define pii pair<ll, ll>
#define vi vector<ll>
#define vii vector<pi... | [["-", 8, 9, 0, 1, 0, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 22]] | 1 | 157 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.