buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int pay = 0;
while (pay <= N) {
pay += 1000;
}
cout << pay - N << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int pay = 0;
while (pay < N) {
pay += 1000;
}
cout << pay - N << endl;
return 0;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]] | 1 | 47 |
/*input
1900
*/
#include <bits/stdc++.h>
using namespace std;
// #define int long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, b) for (int i = a; i < b; i++)
#define all(c) c.begin(), c.end()
#define init(arr, num) memset(arr, num, sizeof(arr))
#define fast ... | /*input
1900
*/
#include <bits/stdc++.h>
using namespace std;
// #define int long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, b) for (int i = a; i < b; i++)
#define all(c) c.begin(), c.end()
#define init(arr, num) memset(arr, num, sizeof(arr))
#define fast ... | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 331 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* clang-format off */
#define MOD 1000000007
#define INF 1000000000
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(a) (a).begin(), (a).end()
#define __DEBUG__
#ifdef __DEBUG__
#define CH_P(a) cout <<"check_point("<<#a<<"... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* clang-format off */
#define MOD 1000000007
#define INF 1000000000
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(a) (a).begin(), (a).end()
#define __DEBUG__
#ifdef __DEBUG__
#define CH_P(a) cout <<"check_point("<<#a<<"... | [["+", 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 | 121 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(... | [["+", 31, 16, 12, 23, 0, 41, 64, 16, 31, 13], ["+", 31, 16, 12, 23, 0, 41, 64, 16, 17, 33]] | 1 | 299 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
if (n % 1000 == 0) {
System.out.print(0);
} else {
System.out.print(n % 1000);
}
}
}
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
if (n % 1000 == 0) {
System.out.print(0);
} else {
System.out.print(1000 - n % 1000);
}
}
}
| [["+", 0, 1, 0, 492, 3, 4, 0, 16, 31, 499], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 33]] | 3 | 78 |
n = int(input())
print(0 if a%1000 == 0 else 1000-a%1000) | n = int(input())
print(0 if n%1000 == 0 else 1000-n%1000) | [["-", 3, 4, 0, 41, 0, 666, 0, 657, 31, 22], ["+", 3, 4, 0, 41, 0, 666, 0, 657, 31, 22], ["-", 3, 4, 0, 41, 0, 657, 12, 657, 31, 22], ["+", 3, 4, 0, 41, 0, 657, 12, 657, 31, 22]] | 5 | 24 |
#include <bits/stdc++.h>
//#include <string>
using namespace std;
#define typeof(x) __typeof__(x)
#define bit(x, i) (x & (1 << i)) // select the bit of position i of x
#define lowbit(x) ((x) & ((x) ^ ((x)-1))) // get the lowest bit of x
#define hBit(msb, n) ... | #include <bits/stdc++.h>
//#include <string>
using namespace std;
#define typeof(x) __typeof__(x)
#define bit(x, i) (x & (1 << i)) // select the bit of position i of x
#define lowbit(x) ((x) & ((x) ^ ((x)-1))) // get the lowest bit of x
#define hBit(msb, n) ... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 947 |
#include <bits/stdc++.h>
#include <cctype>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld long double
#define PRY cout << "YES\n"
#define PRN cout << "NO\n"
#define SETP(sp) fixed << setprecision(sp)
#define PB push_back
#define GO ... | #include <bits/stdc++.h>
#include <cctype>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld long double
#define PRY cout << "YES\n"
#define PRN cout << "NO\n"
#define SETP(sp) fixed << setprecision(sp)
#define PB push_back
#define GO ... | [["+", 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 | 212 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
const ll... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
const ll... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 849 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
ll s = 1000 - n % 1000;
cout << s << endl;
}
| #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
ll s = 1000 - n % 1000;
cout << s % 1000 << endl;
}
| [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 61 |
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
printf("%d", 1000 - a % 1000);
return 0;
} | #include <stdio.h>
int main() {
int a;
scanf("%d", &a);
printf("%d", (1000 - a % 1000) % 1000);
return 0;
} | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 0 | 37 |
#include <algorithm>
#include <complex>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << 1000 - (n % 1000);
return 0;
} | #include <algorithm>
#include <complex>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (1000 - (n % 1000)) % 1000;
return 0;
} | [["+", 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 | 36 |
N = int(input())
ans = 1000 - N % 1000
print(ans) | N = int(input())
ans = 1000 - N % 1000
print(ans % 1000) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 19 |
#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
cout << 1000 - (n % 1000) << "\n";
} | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
cout << (1000 - (n % 1000)) % 1000 << "\n";
} | [["+", 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 | 33 |
a = int(input())
x = 0
for i in range(a):
if a >= x:
x = x + 1000
else:
break
print(abs(x - a)) | a = int(input())
x = 0
for i in range(a):
if a > x:
x = x + 1000
else:
break
print(abs(x - a)) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47]] | 5 | 41 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <sstream>
#include <vector>
using namespace std;
using ll = long long;
using Vec = vector<ll>;
using P = pair<ll, ll>;
usin... | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <sstream>
#include <vector>
using namespace std;
using ll = long long;
using Vec = vector<ll>;
using P = pair<ll, ll>;
usin... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 110 |
# Author : raj1307 - Raj Singh
# Date : 05.07.2020
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
from __builtin__ import xrange as range
from future_builtins import ascii, filter, hex, map, oct, zip
def ii(): return int(input())... |
# Author : raj1307 - Raj Singh
# Date : 05.07.2020
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
from __builtin__ import xrange as range
from future_builtins import ascii, filter, hex, map, oct, zip
def ii(): return int(input())... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 1,403 |
import sys
input = sys.stdin.readline
def readstr():
return input().strip()
def readint():
return int(input())
def readnums():
return map(int, input().split())
def readstrs():
return input().split()
def main():
N = readint()
print((N // 1000 + 1) * 1000 - N)
if __name__ == "__main__"... | import sys
input = sys.stdin.readline
def readstr():
return input().strip()
def readint():
return int(input())
def readnums():
return map(int, input().split())
def readstrs():
return input().split()
def main():
N = readint()
print((N // 1000 + 1) * 1000 - N if N % 1000 else 0)
if __n... | [["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 121], ["+", 0, 652, 3, 4, 0, 41, 0, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 657, 17, 109], ["+", 0, 652, 3, 4, 0, 41, 0, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 95], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 612]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
cout << 1000 - a % 1000 << '\n';
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
cout << (1000 - a % 1000) % 1000 << '\n';
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 | 34 |
n = int(input())
c = 0
while c <= n:
c+=1000
print(c-n) | n = int(input())
c = 0
while c < n:
c+=1000
print(c-n) | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]] | 5 | 25 |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
const double TL = 1.5 * CLOCKS_PER_SEC;
mt19937
rng((unsigned int)c... | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
const double TL = 1.5 * CLOCKS_PER_SEC;
mt19937
rng((unsigned int)c... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 180 |
/*input
4
0 0 1 0 2
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 2;
int mm(int x) {
x %= 1000;
if (x < 0)
x += 1000;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
cout << mm(n) << endl;
return 0;
} | /*input
1900
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 2;
int mm(int x) {
x %= 1000;
if (x < 0)
x += 1000;
return x;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
cout << mm(1000 - n) << endl;
return 0;
} | [["+", 31, 16, 12, 2, 3, 4, 0, 16, 31, 13], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n - n % 1000) << "\n";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << "\n";
} | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 33 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, a, b) for (int i = a; i <= b; i++)
inline ll r() {
ll x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
if (c == '-')
f = -1, c = getchar();
while (isdigit(c))
x = x * 10 + c - '0', c = getcha... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, a, b) for (int i = a; i <= b; i++)
inline ll r() {
ll x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
if (c == '-')
f = -1, c = getchar();
while (isdigit(c))
x = x * 10 + c - '0', c = getcha... | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 135 |
import sys, math,os
from io import BytesIO, IOBase
#data = BytesIO(os.read(0,os.fstat(0).st_size)).readline
# from bisect import bisect_left as bl, bisect_right as br, insort
# from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
# from itertools import permutations,com... | import sys, math,os
from io import BytesIO, IOBase
#data = BytesIO(os.read(0,os.fstat(0).st_size)).readline
# from bisect import bisect_left as bl, bisect_right as br, insort
# from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
# from itertools import permutations,com... | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 109], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 141 |
#include <bits/stdc++.h>
#define ll long long
#define sz(x) (int)x.size()
using namespace std;
int main() {
int n;
cin >> n;
cout << 1000 - n % 1000;
} | #include <bits/stdc++.h>
#define ll long long
#define sz(x) (int)x.size()
using namespace std;
int main() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000;
} | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 36 |
#include <bits/stdc++.h>
#define int long long
#define rep(i, a, b) for (int i = a; i < b; i += 1)
#define reps(i, a, b) for (int i = a; i >= b; i -= 1)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pi pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define i... | #include <bits/stdc++.h>
#define int long long
#define rep(i, a, b) for (int i = a; i < b; i += 1)
#define reps(i, a, b) for (int i = a; i >= b; i -= 1)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pi pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define i... | [["+", 51, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 382 |
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define LOCAL 1
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define dbg(...) \
cout << #__VA_ARGS__ ": ["; \
fo... | #define fi first
#define se second
#define mp make_pair
#define pb push_back
#define LOCAL 1
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define dbg(...) \
cout << #__VA_ARGS__ ": ["; \
fo... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 114 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> ii;
type... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> ii;
type... | [["+", 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 | 267 |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define abdelrahman010 \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef lo... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define abdelrahman010 \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
typedef lo... | [["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 52 |
#include <bits/stdc++.h>
#define debug(x) cout << #x << " -> " << x << endl
#define booga cout << "booga" << endl
#define ll long long int
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
void testcase() {
int n;
cin >> n;
cout << 1000 -... | #include <bits/stdc++.h>
#define debug(x) cout << #x << " -> " << x << endl
#define booga cout << "booga" << endl
#define ll long long int
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
using namespace std;
void testcase() {
int n;
cin >> n;
cout << (1000 ... | [["+", 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 | 83 |
#include <bits/stdc++.h>
#include <stdio.h>
#define ll long long
#define fr(i, p, n) for (int i = p; i < n; i++)
#define fr1(i, p, n) for (int i = p; i >= n; i--)
#define FAST ios::sync_with_stdio(0);
#define sz(v) (ll) v.size()
#define pb push_back
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#... | #include <bits/stdc++.h>
#include <stdio.h>
#define ll long long
#define fr(i, p, n) for (int i = p; i < n; i++)
#define fr1(i, p, n) for (int i = p; i >= n; i--)
#define FAST ios::sync_with_stdio(0);
#define sz(v) (ll) v.size()
#define pb push_back
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 117 |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
if (n % 1000 == 0)
System.out.println(0);
else
System.out.println(n % 1000);
}
}
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
if (n % 1000 == 0)
System.out.println(0);
else
System.out.println(1000 - n % 1000);
}
}
| [["+", 75, 1, 0, 492, 3, 4, 0, 16, 31, 499], ["+", 75, 1, 0, 492, 3, 4, 0, 16, 17, 33]] | 3 | 80 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a) (a).begin(), (a).end()
const ll INF = 1e18 + 18;
const ll MAX = 200000... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a) (a).begin(), (a).end()
const ll INF = 1e18 + 18;
const ll MAX = 200000... | [["+", 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 | 127 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second
#define endl '\n'
#define pb push_back
#define t_case \
ll tt; ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second
#define endl '\n'
#define pb push_back
#define t_case \
ll tt; ... | [["+", 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, 23, 0, 24], ["-", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13], ["-", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 1 | 145 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef map<int, int> mii;
typedef vector<char> ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef map<int, int> mii;
typedef vector<char> ... | [["+", 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 | 644 |
#include <bits/stdc++.h>
#define int long long
//#pragma GCC optimize("Ofast")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#define file(s) \
freopen(s ".in", "r", stdin); ... | #include <bits/stdc++.h>
#define int long long
//#pragma GCC optimize("Ofast")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#define file(s) \
freopen(s ".in", "r", stdin); ... | [["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 20]] | 1 | 274 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
// #include <unordered_map>
#include <cmath>
usin... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
// #include <unordered_map>
#include <cmath>
usin... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 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 | 405 |
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including
// tree_order_statistics_node_update
// using namespace __gnu_pbds;
using namespace std;
#define ordered_set ... | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
// #include <ext/pb_ds/assoc_container.hpp> // Common file
// #include <ext/pb_ds/tree_policy.hpp> // Including
// tree_order_statistics_node_update
// using namespace __gnu_pbds;
using namespace std;
#define ordered_set ... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 194 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (1000 - N % 1000) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << ((1000 - N % 1000) % 1000) << endl;
} | [["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 25]] | 1 | 31 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll M = 1e9 + 7;
const ll MAXN = 1e6 + 7;
const ld pi = acos(-1);
#define gi(n) ll n = read()
#define endl '\n'
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define per(i, a, b) for (ll i = b - 1; i >= a; --i)
typedef... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll M = 1e9 + 7;
const ll MAXN = 1e6 + 7;
const ld pi = acos(-1);
#define gi(n) ll n = read()
#define endl '\n'
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define per(i, a, b) for (ll i = b - 1; i >= a; --i)
typedef... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 2, 3, 4, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 569 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using ll = long long int;
using vec = vector<int>;
using P = pair<int, int>;
const int INF = 1e9 + 7;
int main() {
int n;
cin >> n;
int x = 1000 - n % 1000;
if (x == 0) {
cou... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using ll = long long int;
using vec = vector<int>;
using P = pair<int, int>;
const int INF = 1e9 + 7;
int main() {
int n;
cin >> n;
int x = 1000 - n % 1000;
if (x == 1000) {
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 98 |
#include <iostream>
using namespace std;
int main(int argc, const char **argv) {
int n;
cin >> n;
cout << 1000 - n % 1000;
return 0;
} | #include <iostream>
using namespace std;
int main(int argc, const char **argv) {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000;
return 0;
} | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 38 |
import math
a = int(input())
b = a
a = math.ceil(a/1000)
a = a * 1000
print(b-a) | import math
a = int(input())
b = a
a = math.ceil(a/1000)
a = a * 1000
print(a-b) | [["-", 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 | 34 |
#include <bits/stdc++.h>
#include <string.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n, m) for (int i = n; i < m; i++)
#define reps(i, n) for (int i = 1; i <= n; i++)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
... | #include <bits/stdc++.h>
#include <string.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n, m) for (int i = n; i < m; i++)
#define reps(i, n) for (int i = 1; i <= n; i++)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 177 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (N + 1000 - 1) / 1000 << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout << (N + 1000 - 1) / 1000 * 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 | 36 |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <=... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <=... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 231 |
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int m = n % 1000;
int ans = min(1000 - m, m);
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int m = n % 1000;
int ans = (1000 - m) % 1000;
cout << ans << endl;
return 0;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 21], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 70 |
/*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/
//#pragma GCC optimize("O3,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
//... | /*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/
//#pragma GCC optimize("O3,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
typedef long long ll;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
//... | [["+", 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 | 1,050 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.err.println((1000 - sc.nextInt() % 1000) % 1000);
}
}
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println((1000 - sc.nextInt() % 1000) % 1000);
}
}
| [["-", 8, 196, 0, 1, 0, 492, 500, 509, 119, 22], ["+", 8, 196, 0, 1, 0, 492, 500, 509, 119, 22]] | 3 | 56 |
// Created by Kira
#include <bits/stdc++.h>
using namespace std;
#define IOS \
cin.sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | // Created by Kira
#include <bits/stdc++.h>
using namespace std;
#define IOS \
cin.sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 136 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
... | [["-", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13]] | 1 | 239 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int ans = 0;
n = n % 1000;
cout << n << endl;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int ans = 0;
n = n % 1000;
cout << (1000 - 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], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 36 |
// AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#ifndef ONLINE_JUDGE
#endif
#define _USE_MATH_DEFINES
#include <math.h>
//#include<cmath>
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#... | // AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
// AtCoder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#ifndef ONLINE_JUDGE
#endif
#define _USE_MATH_DEFINES
#include <math.h>
//#include<cmath>
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#... | [["+", 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 | 1,724 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define endl "\n"
#define int long long
#define debug(x) cout << #x << " is " << x << endl;
using namespace std;
const int nmax = 1e5 + 7;
signed main() {
io... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define endl "\n"
#define int long long
#define debug(x) cout << #x << " is " << x << endl;
using namespace std;
const int nmax = 1e5 + 7;
signed main() {
io... | [["+", 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 | 91 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0 << endl;
return 0;
}
n = n % 1000;
cout << n << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n % 1000 == 0) {
cout << 0 << endl;
return 0;
}
n = n % 1000;
cout << 1000 - n << endl;
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33]] | 1 | 53 |
#include <iostream>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int n;
std::cin >> n;
std::cout << n % 1000;
} | #include <iostream>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int n;
std::cin >> n;
std::cout << (1000 - n % 1000) % 1000;
} | [["+", 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 | 52 |
#include <bits/stdc++.h>
int main(void) {
int n;
scanf("%d", &n);
printf("%d", 1000 - (n % 1000));
return 0;
}
| #include <bits/stdc++.h>
int main(void) {
int n;
scanf("%d", &n);
printf("%d", (1000 - (n % 1000)) % 1000);
return 0;
}
| [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 40 |
#include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
int ans;
ans = n % 1000;
if (n == 0) {
cout << 0 << endl;
} else {
cout << 1000 - ans << endl;
}
return 0;
} | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
int ans;
ans = n % 1000;
if (ans == 0) {
cout << 0 << endl;
} else {
cout << 1000 - ans << endl;
}
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 82 |
n = int(input())
print(1000 - (n % 1000) if 1000 - (n % 1000) is not 1000 else 0) | #! env/bin/local python3
# -*- coding: utf-8 -*-
n = int(input())
print(1000 - (n % 1000) if 1000 - (n % 1000) != 1000 else 0)
| [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 694], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 79]] | 5 | 31 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define M 10000001
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
ll div = n / 1000;
if (n % 1000 == 0) {
cout << 0 << endl;
} else {
ll mul = (n + 1) * 1000;
cout << (mul - n)... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define M 10000001
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
ll div = n / 1000;
if (n % 1000 == 0) {
cout << 0 << endl;
} else {
ll mul = (div + 1) * 1000;
cout << (mul - ... | [["-", 49, 50, 51, 16, 31, 23, 0, 16, 31, 22], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 31, 22]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
for (int i = (begin), i##_end_ = (end); i < i##_end... | #include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
for (int i = (begin), i##_end_ = (end); i < i##_end... | [["-", 51, 23, 0, 41, 15, 16, 31, 16, 17, 85], ["+", 51, 23, 0, 41, 15, 16, 31, 16, 17, 109]] | 1 | 317 |
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define ri register int
#define il inline
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define all(x) x.begin(), x.end()
#define rep(i, a, b) fo... | #include <bits/stdc++.h>
#define int long long
#define ld long double
#define ri register int
#define il inline
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define all(x) x.begin(), x.end()
#define rep(i, a, b) fo... | [["+", 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 | 195 |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
typedef long long int ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
const ll mod = 1000000007;
const ll INF = 9223372036854775807;
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())... | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
typedef long long int ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
const ll mod = 1000000007;
const ll INF = 9223372036854775807;
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())... | [["+", 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 | 102 |
#include <bits/stdc++.h>
#include <iostream>
#define ll long long int
using namespace std;
int main() {
ll n;
cin >> n;
cout << 1000 - n % 1000;
} | #include <bits/stdc++.h>
#include <iostream>
#define ll long long int
using namespace std;
int main() {
ll n;
cin >> n;
cout << (1000 - n % 1000) % 1000;
} | [["+", 0, 1, 0, 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, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 32 |
// A
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
int x = 0;
while (x <= n)
x += 1000;
cout << x - n;
return 0;
}
| // A
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
int x = 0;
while (x < n)
x += 1000;
cout << x - n;
return 0;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]] | 1 | 49 |
/*
vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu
rtll==??>>;::::~~~~......`.``````````````````
..J77!`````````...`..._T,~~~~:::;;>??==lttrrv
tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` ``
.,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ... | /*
vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu
rtll==??>>;::::~~~~......`.``````````````````
..J77!`````````...`..._T,~~~~:::;;>??==lttrrv
tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` ``
.,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ... | [["+", 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 | 926 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
int a;
cin >> a;
cout << a % 1000 << '\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
int a;
cin >> a;
cout << (1000 - a % 1000) % 1000 << '\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
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 | 62 |
#include <bits/stdc++.h>
using namespace std;
typedef long long lli;
typedef double lld;
#define mod 1000000007
#define mod2 998244353
#define fori(n) for (int i = 0; i < n; i++)
#define forj(n) for (int j = 0; j < n; j++)
#define pb push_back
#define F first
#define S second
#define fast ios::sync_with_stdio(0), cin.t... | #include <bits/stdc++.h>
using namespace std;
typedef long long lli;
typedef double lld;
#define mod 1000000007
#define mod2 998244353
#define fori(n) for (int i = 0; i < n; i++)
#define forj(n) for (int j = 0; j < n; j++)
#define pb push_back
#define F first
#define S second
#define fast ios::sync_with_stdio(0), cin.t... | [["+", 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 | 299 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <queue>
using namespace std;
int n, m;
int main() {
scanf("%d", &n);
printf("%d\n", (1000 - n % 1000));
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <queue>
using namespace std;
int n, m;
int main() {
scanf("%d", &n);
printf("%d\n", (1000 - n % 1000) % 1000);
} | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 55 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
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 | 56 |
a = int(input())
#a = list(map(int, input().split()))
#x,y = map(int, input().split())
#x,n = map(int, input().split())
#p = input().split()
#for i in range(len(p)):
# p[i] = int(p[i])
money = 0
while True:
if money > a:
print(money-a)
break
else :
money += 1000 | a = int(input())
#a = list(map(int, input().split()))
#x,y = map(int, input().split())
#x,n = map(int, input().split())
#p = input().split()
#for i in range(len(p)):
# p[i] = int(p[i])
money = 0
while True:
if money >= a:
print(money-a)
break
else :
money += 1000 | [["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 37 |
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define f first
#define s second
#define endl '\n'
#define mod 1000000007
void solve() {
int n;
ci... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define f first
#define s second
#define endl '\n'
#define mod 1000000007
void solve() {
int n;
ci... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 122 |
/*
My heart’s beating faster
I know what I’m after
I’ve been standing here my whole life
Everything I’ve seen twice
Now it’s time I realized
It’s spinning back around now
On this road I’m crawlin’
Save me 'cause I’m fallin’
Now I can’t seem to breathe right
'Cause I keep runnin' runnin' runnin' runnin'
Runnin' runnin'... | /*
My heart’s beating faster
I know what I’m after
I’ve been standing here my whole life
Everything I’ve seen twice
Now it’s time I realized
It’s spinning back around now
On this road I’m crawlin’
Save me 'cause I’m fallin’
Now I can’t seem to breathe right
'Cause I keep runnin' runnin' runnin' runnin'
Runnin' runnin'... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 95 |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define countof(array) (sizeof(array) / sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define rrep2(i, n) for (int i ... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define countof(array) (sizeof(array) / sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define rrep2(i, n) for (int i ... | [["+", 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 | 305 |
#include <bits/stdc++.h>
#define DEBUG if (0)
#define lli long long int
#define ldouble long double
using namespace std;
int main() {
int n;
while (scanf("%d", &n) != EOF)
printf("%d\n", n % 1000);
return 0;
} | #include <bits/stdc++.h>
#define DEBUG if (0)
#define lli long long int
#define ldouble long double
using namespace std;
int main() {
int n;
while (scanf("%d", &n) != EOF)
printf("%d\n", (1000 - n % 1000) % 1000);
return 0;
} | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 31, 13], ["+", 3, 4, 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], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 53 |
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> //required
//#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define lb long double
#define pb push_back
#define loop(i, start, n) for (ll i = start; i < n; i++)
#define rloop(i, n, start) for (ll i = n; i >= start; i--)
#define mod 100000000... | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> //required
//#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define lb long double
#define pb push_back
#define loop(i, start, n) for (ll i = start; i < n; i++)
#define rloop(i, n, start) for (ll i = n; i >= start; i--)
#define mod 100000000... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 488 |
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return... | # Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return... | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 31, 612], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 109], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 281 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, a, b) for (int i = (a); i < (b); ++i)
#define PI acos(-1)
#define pcnt __builtin_popcountll
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, a, b) for (int i = (a); i < (b); ++i)
#define PI acos(-1)
#define pcnt __builtin_popcountll
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v... | [["+", 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 | 345 |
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define db double
using namespace std;
int t, n, m, x;
const int maxn = 1e5 + 10;
int a[1005];
int b[2][maxn];
int main() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
} | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define db double
using namespace std;
int t, n, m, x;
const int maxn = 1e5 + 10;
int a[1005];
int b[2][maxn];
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 | 70 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
t... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
t... | [["+", 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 | 605 |
#include <bits/stdc++.h>
using namespace std;
#define MOD (1000000000 + 7)
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define all(x) x.begin(), x.end()
#define print(vec, l, r) \
for (int i = l; i <= r; i++) ... | #include <bits/stdc++.h>
using namespace std;
#define MOD (1000000000 + 7)
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define all(x) x.begin(), x.end()
#define print(vec, l, r) \
for (int i = l; i <= r; i++) ... | [["+", 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 | 140 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#inc... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#inc... | [["+", 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 | 335 |
#!/usr/bin/env python
from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
from __builtin__ import xrange as range
from future_builtins import ascii, filter, hex, map, oct, zip
def main():
n = int(input())
print(1000 - (n % 1... | #!/usr/bin/env python
from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
from __builtin__ import xrange as range
from future_builtins import ascii, filter, hex, map, oct, zip
def main():
n = int(input())
print((1000 - (n % ... | [["+", 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 | 674 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db; //
typedef string str; //
//
typedef pair<int, int> pi;
typedef pair<ll, ll> pl; //
typedef pair<db, db> pd; //
//
typedef vector<int> vi;... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db; //
typedef string str; //
//
typedef pair<int, int> pi;
typedef pair<ll, ll> pl; //
typedef pair<db, db> pd; //
//
typedef vector<int> vi;... | [["+", 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 | 707 |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(a) a.begin(), a.end()
#define lb lower_bound
#define ub upper_bound
#define owo \
ios_... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(a) a.begin(), a.end()
#define lb lower_bound
#define ub upper_bound
#define owo \
ios_... | [["+", 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 | 131 |
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;
typedef long long ll;
const long long MOD = 1000000007;
#define rep(i, n) for (long long i = 0; i < (n); i++)
#define rep2(i, m, n) for (long long i = m; i < (n); i++)
#define ALL(v) v.begi... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;
typedef long long ll;
const long long MOD = 1000000007;
#define rep(i, n) for (long long i = 0; i < (n); i++)
#define rep2(i, m, n) for (long long i = m; i < (n); i++)
#define ALL(v) v.begi... | [["+", 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 | 92 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v)... | [["+", 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 | 206 |
n=int(input())
if(n%1000==0):
print(0)
else:
print((math.ceil(n/1000)*1000)-n) | import math
n=int(input())
if(n%1000==0):
print(0)
else:
print((math.ceil(n/1000)*1000)-n) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 40 |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define endl "\n"
#define se second
#define ll long long
#define inf 0x3f3f3f3f
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define endl "\n"
#define se second
#define ll long long
#define inf 0x3f3f3f3f
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 68 |
#include <bits/stdc++.h>
using namespace std;
void fst() {
ios::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
}
int nxt() {
int x;
cin >> x;
return x;
}
int nex_l() {
long long x;
cin >> x;
return x;
}
typedef long long ll;
typedef vector<int> vi;
type... | #include <bits/stdc++.h>
using namespace std;
void fst() {
ios::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
}
int nxt() {
int x;
cin >> x;
return x;
}
int nex_l() {
long long x;
cin >> x;
return x;
}
typedef long long ll;
typedef vector<int> vi;
type... | [["+", 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, 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 | 230 |
#include <bits/stdc++.h>
using namespace std;
#define gcd(m, n) __gcd(m, n)
#define lcm(m, n) m *(n / gcd(m, n))
#define fast \
std::ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define gcd(m, n) __gcd(m, n)
#define lcm(m, n) m *(n / gcd(m, n))
#define fast \
std::ios_base::sync_with_stdio(false); \
cin.tie(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 | 309 |
// author rhythmicankur
// god_is_almighty
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#define f first
#define s second
#define int long long
#define ll int
#define ld long double
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define vi vector<int>
#define pii pair... | // author rhythmicankur
// god_is_almighty
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#define f first
#define s second
#define int long long
#define ll int
#define ld long double
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define vi vector<int>
#define pii pair... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 390 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pii pair<ll, ll>
#define tii tuple<ll, ll, ll>
#define all(v) (v).begin(), (v).end()
#define ll long long
#define ull unsigned long l... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pii pair<ll, ll>
#define tii tuple<ll, ll, ll>
#define all(v) (v).begin(), (v).end()
#define ll long long
#define ull unsigned long l... | [["+", 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 | 107 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <n... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <n... | [["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]] | 1 | 183 |
/*
* Created by: WeirdBugsButOkay
*/
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define ff first
#define ss second
using namespace std;
void solve() {
int n;
cin >> n;
cout << 1000 - n % 1000 << endl;
}
int main() {
int q = 1;
// scanf("%d", &q);
for (int i = 1; i <= q; i++)... | /*
* Created by: WeirdBugsButOkay
*/
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define ff first
#define ss second
using namespace std;
void solve() {
int n;
cin >> n;
cout << (1000 - n % 1000) % 1000 << endl;
}
int main() {
int q = 1;
// scanf("%d", &q);
for (int i = 1; i <... | [["+", 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 | 77 |
#include <bits/stdc++.h>
using namespace std;
#define INF 1234567890LL
#define ll long long
int N;
int main() {
scanf("%d", &N);
printf("%d", 1000 - N % 1000);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define INF 1234567890LL
#define ll long long
int N;
int main() {
scanf("%d", &N);
printf("%d", (1000 - N % 1000) % 1000);
return 0;
} | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]] | 1 | 47 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
//マクロ
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REPS(i, n) for (int i = 1; i <= (int)(n); ++i)... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
//マクロ
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REPS(i, n) for (int i = 1; i <= (int)(n); ++i)... | [["+", 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 | 307 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | [["+", 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 | 146 |
# Contest No.: ABC173
# Problem No.: A
# Solver: JEMINI
# Date: 20200705
import sys
import heapq
def main():
n = int(input())
print(1000 - n % 1000)
return
if __name__ == "__main__":
main() | # Contest No.: ABC173
# Problem No.: A
# Solver: JEMINI
# Date: 20200705
import sys
import heapq
def main():
n = int(input())
print((1000 - n % 1000) % 1000)
return
if __name__ == "__main__":
main() | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 109], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 40 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.