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
#500-1000, 5-5 x = int(input()) fiveHundred = x//500 x -= fiveHundred fives = x//5 print(fiveHundred*1000+fives*5)
x = int(input()) fiveHundred = x//500 x -= fiveHundred*500 fives = x//5 print(fiveHundred*1000+fives*5)
[["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 48], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612]]
5
32
// abc160_b.cc #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; ll ans = 0; if (x >= 500) { ans += 1000 * (x / 500); x %= 1000; } if (x >= 5) { ans += 5 * (x / 5); } cout << ans << endl; }
// abc160_b.cc #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; ll ans = 0; if (x >= 500) { ans += 1000 * (x / 500); x %= 500; } if (x >= 5) { ans += 5 * (x / 5); } cout << ans << endl; }
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]]
1
77
#include <bits/stdc++.h> using namespace std; #define rep(i, n) rep2(i, 0, n) #define rep2(i, m, n) for (int i = m; i < (n); i++) #define all(a) (a).begin(), (a).end() typedef long long ll; #define INF 1e9 typedef pair<int, int> P; /*  "assert" * assert(A:条件式)で Aが真なら処理は続行、偽ならプログラムを終了する */ /*  ラムダ式   auto a = [キャプチャ]...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) rep2(i, 0, n) #define rep2(i, m, n) for (int i = m; i < (n); i++) #define all(a) (a).begin(), (a).end() typedef long long ll; #define INF 1e9 typedef pair<int, int> P; /*  "assert" * assert(A:条件式)で Aが真なら処理は続行、偽ならプログラムを終了する */ /*  ラムダ式   auto a = [キャプチャ]...
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]]
1
100
x = int(input()) div = x//500 rem = x-div*500 res = div*1000 + (rem//5)*5
x = int(input()) div = x//500 rem = x-div*500 res = div*1000 + (rem//5)*5 print(res)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
33
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { // your code goes here ll n; cin >> n; ll z = n / 500; ll r = n % 200; ll t = r / 5; ll ans = z * 1000 + t * 5; cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { // your code goes here ll n; cin >> n; ll z = n / 500; ll r = n % 500; ll t = r / 5; ll ans = z * 1000 + t * 5; cout << ans; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
65
S = input() U500 = int(S) // 500 U5 = (int(S) % 500)//5 happy = U500*1000+U5 print(str(happy))
S = input() U500 = int(S) // 500 U5 = (int(S) % 500)//5 happy = U500*1000+U5*5 print(str(happy))
[["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]]
5
39
x = input() print(x//500*1000 + (x%500)//5*5)
x = int(input()) print(x//500*1000 + (x%500)//5*5)
[["+", 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
23
X = int(input()) div = int(X/500) mod = int(X%500) hap = 0 if div != 0: hap = div*2 q = int(mod/5) hap += q*5 print(hap)
X = int(input()) div = int(X/500) mod = int(X%500) hap = 0 if div != 0: hap = div*1000 q = int(mod/5) hap += q*5 print(hap)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
54
x = int(input()) a = x // 500 b = (x - a) // 5 print(1000*a + 5*b)
x = int(input()) a = x // 500 b = (x % 500) // 5 print(1000*a + 5*b)
[["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 109], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612]]
5
32
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define mod 1000000007 typedef long long ll; using namespace std; int main() { ll x; ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define mod 1000000007 typedef long long ll; using namespace std; int main() { ll x; ...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["-", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22]]
1
89
x = int(input()) q, mod = divmod(x, 500) print(q*2000 + 5*(mod//5))
x = int(input()) q, mod = divmod(x, 500) print(q*1000 + 5*(mod//5))
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612]]
5
32
X=int(input()) print(X//500*1000+(X-X//500)//5*5)
X=int(input()) print(X//500*1000+(X-X//500*500)//5*5)
[["+", 31, 657, 31, 23, 0, 657, 12, 657, 17, 48], ["+", 31, 657, 31, 23, 0, 657, 12, 657, 12, 612]]
5
28
X= int(input()) total = (X//500)*1000 + (X%500)//5*5
X= int(input()) print((X//500)*1000 + (X%500)//5*5)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
27
yen = int(input()) count = 0 while yen - 500 > 0: yen -= 500 count += 1000 while yen - 5 > 0: yen -= 5 count += 5 print(count)
yen = int(input()) count = 0 while yen - 500 >= 0: yen -= 500 count += 1000 while yen - 5 >= 0: yen -= 5 count += 5 print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20]]
5
41
#include <bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for (int i = 0; i < (n); i++) #define REP1(i, n) for (int i = 1; i < (n); i++) #define REP2(i, d, n) for (int i = (d); i < (n); i++) #define RREP(i, n) for (int i = (n); i >= ...
#include <bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for (int i = 0; i < (n); i++) #define REP1(i, n) for (int i = 1; i < (n); i++) #define REP2(i, d, n) for (int i = (d); i < (n); i++) #define RREP(i, n) for (int i = (n); i >= ...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 0, 11, 12, 16, 31, 23, 0, 16, 17, 109], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 85]]
1
241
X = int(input()) c = 0 while X>500: c = c + 1000 X = X - 500 while X>=5: c = c + 5 X = X - 5 print(c)
X = int(input()) c = 0 while X>=500: c = c + 1000 X = X - 500 while X>=5: c = c + 5 X = X - 5 print(c)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20]]
5
45
X=int(input()) ans=(X-X%500)*2 X=X-X%500 ans=ans+(X-X%5) print(ans)
X=int(input()) ans=(X-X%500)*2 X=X%500 ans=ans+(X-X%5) print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22]]
5
41
#include <iostream> using namespace std; int main() { long long a, b = 500, v = 0, g = 5, d, e; cin >> a; while (a > b) { a = a - b; v = v + 1000; } while (a > g) { a = a - g; v = v + 5; } cout << v << endl; return 0; }
#include <iostream> using namespace std; int main() { long long a, b = 500, v = 0, g = 5, d, e; cin >> a; while (a >= b) { a = a - b; v = v + 1000; } while (a >= g) { a = a - g; v = v + 5; } cout << v << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
85
import math line = input() money = int(line) happy = 0 calc_500 = math.floor(money / 500) if calc_500 > 1: happy += calc_500 * 1000 money -= calc_500 * 500 calc_5 = math.floor(money / 5) if calc_5 > 1: happy += calc_5 * 5 print(str(happy)) else: print(str(happy)) else: calc_5 = mat...
import math line = input() money = int(line) happy = 0 calc_500 = math.floor(money / 500) if calc_500 >= 1: happy += calc_500 * 1000 money -= calc_500 * 500 calc_5 = math.floor(money / 5) if calc_5 >= 1: happy += calc_5 * 5 print(str(happy)) else: print(str(happy)) else: calc_5 = m...
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 20], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 20]]
5
115
S = open(0).read().strip('\n') q = int(S) // 500 mod = int(S) % 500 % 5 print(q*1000+mod*5)
S = open(0).read().strip('\n') q = int(S) // 500 mod = int(S) % 500 //5 print(q*1000+mod*5)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
45
en=int(input()) a=en/500 b=(en%500)/5 print(a*1000+b*5)
en = int(input()) a = int(en/500) b = int(en%500/5) print(a*1000+b*5)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
32
s=int(input()) temp=0 temp+=(s//500)*1000 s=s//500 temp+=(s//5)*5 print(temp)
s=int(input()) temp=0 temp+=(s//500)*1000 s=s%500 temp+=(s//5)*5 print(temp)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109]]
5
38
s = int(input()) count1=-1 count2=-1 while s>=0: s=s-500 count1=count1 +1 s=s+500 print(count1) if s==0: yasashisa=count1*1000 print(yasashisa) else: while s >=0: s=s-5 count2=count2 +1 yasashisa=count1*1000+count2* 5 print(yasashisa)
s = int(input()) count1=-1 count2=-1 while s>=0: s=s-500 count1=count1 +1 s=s+500 if s==0: yasashisa=count1*1000 print(yasashisa) else: while s >=0: s=s-5 count2=count2 +1 yasashisa=count1*1000+count2* 5 print(yasashisa)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
84
function main(input) { a = Math.floor(input / 500); b = Math.floor((input - 500 * a) / 5); console.log("%d", a * 100 + b * 5); } main(require("fs").readFileSync("/dev/stdin", "utf8"));
function main(input) { a = Math.floor(input / 500); b = Math.floor((input - 500 * a) / 5); console.log("%d", a * 1000 + b * 5); } main(require("fs").readFileSync("/dev/stdin", "utf8"));
[["-", 0, 2, 3, 3, 0, 16, 31, 16, 12, 555], ["+", 0, 2, 3, 3, 0, 16, 31, 16, 12, 555]]
2
73
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() #define bit(x) (1L << (x)) using ll = long long; using namespace std; template <typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); } template <typenam...
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() #define bit(x) (1L << (x)) using ll = long long; using namespace std; template <typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); } template <typenam...
[["-", 31, 16, 12, 16, 12, 16, 31, 16, 17, 109], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85]]
1
146
X=int(input()) #1200 a=X//500 #2 b=(X-500*a)//5 # print(a+b)
X=int(input()) #1200 a=X//500 #2 b=(X-500*a)//5 # print(1000*a+5*b)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48]]
5
33
x = int(input()) print((x / 500) * 1000 + ((x % 500) / 5) * 5)
x = int(input()) print((x // 500) * 1000 + ((x % 500) // 5) * 5)
[["-", 0, 657, 31, 657, 31, 23, 0, 657, 17, 85], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 17, 676], ["-", 0, 657, 12, 657, 31, 23, 0, 657, 17, 85], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 17, 676]]
5
30
n = int(input()) print(int((n/500))*1000 + int((n%500)/5))*5
n = int(input()) print(int((n/500))*1000 + int((n%500)/5)*5)
[["-", 0, 1, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
34
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; ll x = n % 1000; n -= x; n *= 2; n += (x - x % 5); cout << n; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; ll x = n % 500; n -= x; n *= 2; n += (x - x % 5); cout << n; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
51
money = gets.to_i div, mod = money.div_mod(500) ureshi = div*1000 div = mod/5 ureshi += div*5 puts "#{ureshi}"
money = gets.to_i div, mod = money.divmod(500) ureshi = div*1000 div = mod/5 ureshi += div*5 puts "#{ureshi}"
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
36
num_origin = input() gohyoku = int(num_origin/500) num_zan = num_origin - gohyoku*500 go = int(go/5) num = go*5 + gohyoku*1000 print(num)
num_origin = int(input()) gohyoku = int(num_origin/500) num_zan = num_origin - gohyoku*500 go = int(num_zan/5) num = go*5 + gohyoku*1000 print(num)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22]]
5
41
/* --> WHEN IT'S OBVIOUS THAT THE GOAL CANNOT BE REACHED, DON'T ADJUST THE GOALS, ADJUST THE ACTION STEPS. --> THE WAY YOU CONQUER SELF-DOUBT IS BY DOING THINGS THAT MAKE YOU UNCOMFORTABLE. --> IT IS DURING OUR DARKEST MOMENTS WE MUST FOCUS TO SEE LIGHT. */ #include <algorithm> #include <climits> #in...
/* --> WHEN IT'S OBVIOUS THAT THE GOAL CANNOT BE REACHED, DON'T ADJUST THE GOALS, ADJUST THE ACTION STEPS. --> THE WAY YOU CONQUER SELF-DOUBT IS BY DOING THINGS THAT MAKE YOU UNCOMFORTABLE. --> IT IS DURING OUR DARKEST MOMENTS WE MUST FOCUS TO SEE LIGHT. */ #include <algorithm> #include <climits> #in...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
304
n = int(input()) ans = n // 500 * 1000 n //= 500 ans += n // 5 * 5 print(ans)
n = int(input()) ans = n // 500 * 1000 n %= 500 ans += n // 5 * 5 print(ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 677, 17, 691], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 132]]
5
29
X = int(input()) print(int(X/500)*500 + int((X%500)/5)*5)
X = int(input()) print(int(X/500)*1000 + int((X%500)/5)*5)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612]]
5
32
num = int(input().strip()) ans = 0 ans += (num//500)*1000 num = num%500 ans += (num//5) print(ans)
num = int(input().strip()) ans = 0 ans += (num//500)*1000 num = num%500 ans += (num//5)*5 print(ans)
[["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 48], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612]]
5
40
#include <bits/stdc++.h> using namespace std; int main() { long long int a; cin >> a; long long int ans = a / 500; ans *= 1000; a %= 500; ans += (a / 5) * 5; cout << a; }
#include <bits/stdc++.h> using namespace std; int main() { long long int a; cin >> a; long long int ans = a / 500; ans *= 1000; a %= 500; ans += (a / 5) * 5; cout << ans; }
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
52
r=gets.to_i l=r/500*1000 r-=p/2 l=r/5*5 p l
r=gets.to_i l=r/500*1000 r-=l/2 l+=r/5*5 p l
[["-", 36, 36, 0, 493, 0, 755, 12, 738, 31, 22], ["+", 36, 36, 0, 493, 0, 755, 12, 738, 31, 22], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["+", 36, 36, 36, 36, 0, 493, 0, 755, 17, 107]]
4
26
X = input() print(X // 500 * 1000 + X % 500 // 5 * 5)
X = int(input()) print(X // 500 * 1000 + X % 500 // 5 * 5)
[["+", 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
21
// created by mtnshh #include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define rep(i, a, b) for (ll i = a; i < b; i++) #define repb(i, a, b) for (ll i = a; i >= b; i--) #define err() cout << "==================================" << endl; #define errA(A) ...
// created by mtnshh #include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define rep(i, a, b) for (ll i = a; i < b; i++) #define repb(i, a, b) for (ll i = a; i >= b; i--) #define err() cout << "==================================" << endl; #define errA(A) ...
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13]]
1
217
X=int(input()) a=X/500 X%=500 b=X/5 print(1000*a+5*b)
X=int(input()) a=X//500 X%=500 b=X//5 print(1000*a+5*b)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
31
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define IOS \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define IOS \ ios_base::sync_with_stdio(0); \ cin.tie(0); ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
255
/* JAI JAGANNATH! */ //@Author : zanj0 #include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; typedef long long int lli; template <typename T> vo...
/* JAI JAGANNATH! */ //@Author : zanj0 #include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; typedef long long int lli; template <typename T> vo...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
182
X=int(input()) ans = 0 ans += 1000*(X//500) ans += 5*(X%500)//5 print(ans)
X=int(input()) ans = 0 ans += 1000*(X//500) ans += 5*((X%500)//5) print(ans)
[["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 677, 12, 657, 12, 23, 0, 25]]
5
35
# -*- coding: utf-8 -*- s = int(input()) happy = 0 if s >= 500: happy += 1000 * (s // 500) s = s % 500 if s >= 5: happy += 5 * (s // 500) print(happy)
# -*- coding: utf-8 -*- s = int(input()) happy = 0 if s >= 500: happy += 1000 * (s // 500) s = s % 500 if s >= 5: happy += 5 * (s // 5) print(happy)
[["-", 0, 677, 12, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 677, 12, 657, 12, 23, 0, 657, 12, 612]]
5
49
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <stack> #include <stdlib.h> #include <string> #include <vector> int main() { long long a; std::cin >> a; long long ans = 0; ans += (a / 500) * 1000;...
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <stack> #include <stdlib.h> #include <string> #include <vector> int main() { long long a; std::cin >> a; long long ans = 0; ans += (a / 500) * 1000;...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132]]
1
83
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long happy; happy = 1000 * (X / 500); X %= 1000; happy += 5 * (X / 5); cout << happy << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long happy; happy = 1000 * (X / 500); X %= 500; happy += 5 * (X / 5); cout << happy << endl; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
54
user = int(input()) c500 = user//500 user -= c500*500 c5 = user/5 ans = (c500*1000)+(c5*5) print(ans)
user = int(input()) c500 = user//500 user -= c500*500 c5 = user//5 ans = (c500*1000)+(c5*5) print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
40
#include <iostream> using namespace std; int main() { long long int n, fh, f; cin >> n; fh = n / 500; n /= 500; f = n / 5; cout << fh * 1000 + f * 5; return 0; }
#include <iostream> using namespace std; int main() { long long int n, fh, f; cin >> n; fh = n / 500; n = n - fh * 500; f = n / 5; cout << fh * 1000 + f * 5; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48]]
1
54
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const int MOD = (int)1e9 + 7; const ll INF = (ll)1e18 + 7; #define int long long #define vint vector<int> #def...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const int MOD = (int)1e9 + 7; const ll INF = (ll)1e18 + 7; #define int long long #define vint vector<int> #def...
[["+", 12, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85]]
1
166
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; int ans = (X / 500) * 1000 + ((X % 1024) / 5) * 5; printf("%lld", ans); }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long ans = (X / 500) * 1000 + ((X % 500) / 5) * 5; printf("%lld", ans); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
52
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll x; cin >> x; cout << (x / 500) * 1000 + ((x % 500) % 5) * 5; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll x; cin >> x; cout << (x / 500) * 1000 + ((x % 500) / 5) * 5; }
[["-", 12, 16, 12, 16, 31, 23, 0, 16, 17, 109], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 85]]
1
68
// #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define ii pair<int, int> #define vi vector<int> #define vii vector<pair<int, int>> #define IO \ ios::sync_with_stdio(0); ...
// #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define ii pair<int, int> #define vi vector<int> #define vii vector<pair<int, int>> #define IO \ ios::sync_with_stdio(0); ...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132]]
1
87
money = int(input()) c_500 = money/500 c_5 = (money%500)/5 print(1000*c_500+5*c_5)
money = int(input()) c_500 = money//500 c_5 = (money%500)//5 print(1000*c_500+5*c_5)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
32
package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Scan() return sc.Text() } func main() { word := nextLine() number, _ := strconv.Atoi(word) thou := number / 50 number = number % 50 fivr := number / 5 fmt.Println(thou*1000 + fivr*5) }
package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Scan() return sc.Text() } func main() { word := nextLine() number, _ := strconv.Atoi(word) thou := number / 500 number = number % 500 fivr := number / 5 fmt.Println(thou*1000 + fivr*5) }
[["-", 8, 196, 0, 431, 12, 432, 0, 16, 12, 433], ["+", 8, 196, 0, 431, 12, 432, 0, 16, 12, 433], ["-", 8, 196, 0, 436, 12, 432, 0, 16, 12, 433], ["+", 8, 196, 0, 436, 12, 432, 0, 16, 12, 433]]
7
110
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(System.in); long x = sc.nextLong(); long ans = cal(x); ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(System.in); long x = sc.nextLong(); long ans = cal(x); ...
[["-", 8, 196, 0, 503, 49, 200, 51, 16, 17, 109], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 85]]
3
432
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define endl "\n" #define deb(x) cerr << #x << ":" << x << "\n" int main() { ios::sync_with_stdio(0); cin.tie(0); ll x; cin >> x; cout << ((x / 500) * 1000) + (((x % 1000) / 5) * 5); return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define endl "\n" #define deb(x) cerr << #x << ":" << x << "\n" int main() { ios::sync_with_stdio(0); cin.tie(0); ll x; cin >> x; cout << ((x / 500) * 1000) + (((x % 500) / 5) * 5); return 0; }
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
81
x = int(input()) ans = 0 l500 = x // 500 x -= l500 * 500 l5 = x // 5 print(l500 * 1000 + l5)
x = int(input()) ans = 0 l500 = x // 500 #print(l500)# x -= l500 * 500 #print(x)# l5 = x // 5 #print(l5)# print(l500 * 1000 + l5 * 5) #print(' ')#
[["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]]
5
34
a=int(input()) hp = (a-(a%500))/500 f=(a%500) ct=int(hp)*1000 ct+=int((f-(a%5))/5)*5
a=int(input()) hp = (a-(a%500))/500 f=(a%500) ct=int(hp)*1000 ct+=int((f-(a%5))/5)*5 print(ct)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
54
#include <bits/stdc++.h> using namespace std; using ll = long long; #define debug(a) cout << #a << ": " << a << endl #define sz(a) int(a.size()) #define rep(i, n) for (int i = 0; i < n; i++) #define forr(i, st, en) for (int i = st; i < en; i++) #define all(v) (v).begin(), (v).end() #define fast ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define debug(a) cout << #a << ": " << a << endl #define sz(a) int(a.size()) #define rep(i, n) for (int i = 0; i < n; i++) #define forr(i, st, en) for (int i = st; i < en; i++) #define all(v) (v).begin(), (v).end() #define fast ...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]]
1
108
money = int(input()) num_500 = int(money / 500) remaining = int(money % 500) num_5 = int(remaining / 5) print('{}'.format(num_500 * 1000 + num_5 * 500 ))
money = int(input()) num_500 = int(money / 500) remaining = int(money % 500) num_5 = int(remaining / 5) print('{}'.format(num_500 * 1000 + num_5 * 5 ))
[["-", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]]
5
49
X = input() tmp = X // 500 ans = tmp * 1000 + X % 500 - ((X % 500) % 5) print(ans)
X = int(input()) tmp = X // 500 ans = tmp * 1000 + X % 500 - ((X % 500) % 5) print(ans)
[["+", 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
33
<?php $n = intval(fgets(STDIN)); $a = intdiv($n, 1000); $b = intdiv($n%1000, 5); echo $a*2000+$b*5;
<?php $n = intval(fgets(STDIN)); $a = intdiv($n, 500); $b = intdiv($n%500, 5); echo $a*1000+$b*5;
[["-", 0, 11, 12, 613, 3, 3, 0, 28, 0, 612], ["+", 0, 11, 12, 613, 3, 3, 0, 28, 0, 612], ["-", 12, 613, 3, 3, 0, 28, 0, 16, 12, 612], ["+", 12, 613, 3, 3, 0, 28, 0, 16, 12, 612], ["-", 0, 493, 0, 608, 0, 16, 31, 16, 12, 612], ["+", 0, 493, 0, 608, 0, 16, 31, 16, 12, 612]]
6
47
//#pragma GCC optimize("03", "unroll-loops") //#pragma GCC target("avx2") #include <bits/stdc++.h> #define fast() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
//#pragma GCC optimize("03", "unroll-loops") //#pragma GCC target("avx2") #include <bits/stdc++.h> #define fast() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 85], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 12, 13]]
1
238
X = int(input()) count=(X//500)*1000 X=X//500 count+=(X//5)*5 print(count)
X = int(input()) count=(X//500)*1000 X=X%500 count+=(X//5)*5 print(count)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109]]
5
35
#include <bits/stdc++.h> using namespace std; using lint = long long; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); lint x; cin >> x; cout << (x / 500) * 1000 + ((x % 1000) / 5) * 5 << '\n'; }
#include <bits/stdc++.h> using namespace std; using lint = long long; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); lint x; cin >> x; cout << (x / 500) * 1000 + ((x % 500) / 5) * 5 << '\n'; }
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
72
X = int(input()) Y = X%500 Z = (X-Y*500)%5 print(1000*Y+5*Z)
X = int(input()) Y = X//500 Z = (X-Y*500)//5 print(1000*Y+5*Z)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
34
i=int(input()) print((i//500)*1000+(i-(i//500*500)//5*5))
i=int(input()) print((i//500)*1000+((i-(i//500*500))//5*5))
[["+", 12, 23, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 31, 657, 31, 23, 0, 657, 12, 23, 0, 25]]
5
34
x = int(input()) c_500 = x // 500 x = c_500 * 500 c_5 = x // 5 print(c_500 * 1000 + c_5 * 5)
x = int(input()) c_500 = x // 500 x = x - c_500 * 500 c_5 = x // 5 print(c_500 * 1000 + c_5 * 5)
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33]]
5
33
n=int(input()) happy=0 def covid(num): if num==0: return 0 else: fund=num//500 num-=fund*500 happy+=fund*1000 happy+=num//5*5 return happy print(covid(n))
n=int(input()) def covid(num): if num==0: return 0 else: happy=0 fund=num//500 num-=fund*500 happy+=fund*1000 happy+=num//5*5 return happy print(covid(n))
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]]
5
57
X = int(input()) ans =0 while(1): print(X) if X < 5: break elif X<500: tmp = X // 5 ans +=tmp*5 X = X% 5 else: tmp = X // 500 ans +=tmp*1000 X = X %500 print(ans)
X = int(input()) ans =0 while(1): if X < 5: break elif X<500: tmp = X // 5 ans +=tmp*5 X = X% 5 else: tmp = X // 500 ans +=tmp*1000 X = X %500 print(ans)
[["-", 0, 52, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
67
#include <algorithm> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vector> using namespace std; #define rep(i, a, n) fo...
#include <algorithm> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <time.h> #include <vector> using namespace std; #define rep(i, a, n) fo...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]]
1
1,241
s = int(input()) res = (s//500)*1000 + (s%500)//5 print(res)
s = int(input()) res = (s//500)*1000 + ((s%500)//5)*5 print(res)
[["+", 12, 657, 31, 23, 0, 657, 31, 23, 0, 24], ["+", 12, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 662, 12, 657, 12, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48]]
5
29
#include <iostream> using namespace std; int main(void) { long n; cin >> n; long ans = n / 500; ans += n % 500 / 5; cout << ans << endl; }
#include <iostream> using namespace std; int main(void) { long n; cin >> n; long ans = n / 500 * 1000 + n % 500 / 5 * 5; cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 17, 48], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 49, 50, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 43,...
1
41
a = int(input()) ans = 0 ans += (a//1000)*2000 a %= 1000 ans += (a//5)*5 print(ans)
a = int(input()) ans = 0 ans += (a//500)*1000 a %= 500 ans += (a//5)*5 print(ans)
[["-", 0, 677, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612], ["-", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612]]
5
36
#include <bits/stdc++.h> using namespace std; long long n; int main() { cin >> n; long long su = 0; su += (n / 500) * 1000; su += (n / 500) / 5 * 5; cout << su << "\n"; }
#include <bits/stdc++.h> using namespace std; long long n; int main() { cin >> n; long long su = 0; su += (n / 500) * 1000; su += ((n % 500) / 5) * 5; cout << su << "\n"; }
[["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 17, 85], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 109], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
56
x = int(input()) print((x//500*1000) + (x%1000//5*5))
x = int(input()) print((x//500*1000) + (x%500//5*5))
[["-", 12, 23, 0, 657, 31, 657, 31, 657, 12, 612], ["+", 12, 23, 0, 657, 31, 657, 31, 657, 12, 612]]
5
28
X=int(input()) print((X//500)*2+(X%500)//5)
X=int(input()) print((X//500)*1000+(X%500)//5*5)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48]]
5
26
X = int(input()) a = X // 500 b = (X - a * 500) // 5 print(a + b)
X = int(input()) a = X // 500 b = (X - a * 500) // 5 print(1000 * a + 5 * b)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48]]
5
30
#include <iostream> using namespace std; int main() { long long n; cin >> n; long long ans = 1000 * (n / 500); n %= 500; ans += 2 * (n / 5); cout << ans; return 0; }
#include <iostream> using namespace std; int main() { long long n; cin >> n; long long ans = 1000 * (n / 500); n %= 500; ans += 5 * (n / 5); cout << ans; return 0; }
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 13]]
1
53
coin_value = [[500, 1000], [5, 5]] result = 0 x = int(input().strip()) idx = 0 for coin, value in coin_values: result += value * (x // coin) x = x - x // coin * coin print(result)
coin_values = [[500, 1000], [5, 5]] result = 0 x = int(input().strip()) idx = 0 for coin, value in coin_values: result += value * (x // coin) x = x - x // coin * coin print(result)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]]
5
62
#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() { ll X; cin >> X; ll sita = X % 499ll; cout << ((X / 500ll) * 1000ll + (sita / 5ll) * 5ll) << 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() { ll X; cin >> X; ll sita = X % 500ll; cout << ((X / 500ll) * 1000ll + (sita / 5ll) * 5ll) << endl; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
75
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; cin >> n; ll x = n / 500; n -= x * 500; ll y = n / 5; ll ans = 0; ans += x * 500 * 2; ans += y * 5; return ans; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; cin >> n; ll x = n / 500; n -= x * 500; ll y = n / 5; ll ans = 0; ans += x * 500 * 2; ans += y * 5; cout << ans; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
64
n = int(input()) div_500, mod_500 = divmod(n,500) if mod_500 > 0: div_5, mod = divmod(mod_500, 5) print(div_500*1000 + div_5*5) else: print(div_500*100)
n = int(input()) div_500, mod_500 = divmod(n,500) if mod_500 > 0: div_5, mod = divmod(mod_500, 5) print(div_500*1000 + div_5*5) else: print(div_500*1000)
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
51
x=int(input()) five_hundred=int(x/500) five=int((x-five_hundred)/5) print(five_hundred*1000+five*5)
x=int(input()) five_hundred=int(x/500) five=int((x-five_hundred*500)/5) print(five_hundred*1000+five*5)
[["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 48], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612]]
5
38
# coding: UTF-8 import os def remove_empty(target_list: list): empty_removed_list = [x for x in target_list if x] return empty_removed_list def get_stdin_str_list(): input_str = input().strip() input_str_list = input_str.split() return input_str_list def get_stdin_int_list(): input_str_list =...
# coding: UTF-8 import os def remove_empty(target_list: list): empty_removed_list = [x for x in target_list if x] return empty_removed_list def get_stdin_str_list(): input_str = input().strip() input_str_list = input_str.split() return input_str_list def get_stdin_int_list(): input_str_list =...
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]]
5
112
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll x; cin >> x; if (x < 500) { cout << (4 * (x / 5)); } else { ll q1 ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(a) int((a).size()) int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll x; cin >> x; if (x < 500) { cout << (5 * (x / 5)); } else { ll q1 ...
[["-", 0, 1, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 0, 1, 0, 16, 12, 23, 0, 16, 31, 13]]
1
115
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; cout << (x / 500) * 1000 + (x % 500) * 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; cout << (x / 500) * 1000 + ((x % 500) / 5) * 5 << endl; return 0; }
[["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 85], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13]]
1
43
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long g500, g5; long long happy = 0; if (x >= 500) { g500 = x / 500; x %= 500; happy += 1000 * g500; } else { g5 = x / 5; happy += 5 * g5; } cout << happy << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long g500, g5; long long happy = 0; if (x >= 500) { g500 = x / 500; x %= 500; happy += 1000 * g500; } if (x < 500) { g5 = x / 5; happy += 5 * g5; } cout << happy << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25]]
1
80
package main import "fmt" func main(){ var M int fmt.Scanf("%d",&M) var res int res = M/500 * 1000 res += (M%500)*5 fmt.Println(res) }
package main import "fmt" func main(){ var M int fmt.Scanf("%d",&M) var res int res = M/500 * 1000 res += (M%500)/5*5 fmt.Println(res) }
[["+", 0, 436, 12, 432, 0, 16, 31, 16, 17, 85], ["+", 0, 436, 12, 432, 0, 16, 31, 16, 12, 433]]
7
60
money = int(input()) # 500yen = 1000happy, 5yen = 1happy n_500 = int(money//500) n_5 = int((money - 500*n_500)//5) happiness = 1000 * n_500 + n_5 print(happiness)
money = int(input()) # 500yen = 1000happy, 5yen = 5happy n_500 = int(money//500) n_5 = int((money - 500*n_500)//5) happiness = 1000 * n_500 + 5 * n_5 print(happiness)
[["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48]]
5
42
#include <stdio.h> int main() { int p, yen, z, yu, x; scanf("%d,&yen"); z = yen / 500; yu = yen - z * 500; x = yu / 5; p = z * 1000 + x * 5; printf("%d,p"); return 0; }
#include <stdio.h> int main() { int p, yen, z, yu, x; scanf("%d", &yen); z = yen / 500; yu = yen - z * 500; x = yu / 5; p = z * 1000 + x * 5; printf("%d", p); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
0
66
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vvd = vector<vd>; using vc = vector<char>; using vb = vector<bool>; using vl = vector<ll>; #define rep(i, x, n) for (int i = x; i < n; i++) #define all(x) x.begin(), x.end...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vd = vector<double>; using vvd = vector<vd>; using vc = vector<char>; using vb = vector<bool>; using vl = vector<ll>; #define rep(i, x, n) for (int i = x; i < n; i++) #define all(x) x.begin(), x.end...
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]]
1
124
x = int(input()) a = x//500 b = (x%500)//5 print(a+b)
x = int(input()) a = x//500 b = (x%500)//5 print(a*1000+b*5)
[["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]]
5
28
import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; public class Main { public static void main(String[] args) throws IOException { InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF...
import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; public class Main { public static void main(String[] args) throws IOException { InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF...
[["-", 8, 519, 0, 1, 0, 11, 12, 16, 12, 499], ["+", 8, 519, 0, 1, 0, 11, 12, 16, 12, 499]]
3
170
def solve(): val = int(input()) print(val/500 * 1000 + (val%500)/5 * 5) solve()
def solve(): val = int(input()) print(val//500 * 1000 + (val%500)//5 * 5) solve()
[["-", 3, 4, 0, 657, 31, 657, 31, 657, 17, 85], ["+", 3, 4, 0, 657, 31, 657, 31, 657, 17, 676], ["-", 3, 4, 0, 657, 12, 657, 31, 657, 17, 85], ["+", 3, 4, 0, 657, 12, 657, 31, 657, 17, 676]]
5
34
#include <stdio.h> int main() { long long int n; scanf("%lld", &n); long long int a, b; a = n / 500; b = (n - 500) / 5; printf("%lld", (a * 1000) + (5 * b)); return 0; }
#include <stdio.h> int main() { long long int n; scanf("%lld", &n); long long int a, b; a = n / 500; b = (n - 500 * a) / 5; printf("%lld", (a * 1000) + (5 * b)); return 0; }
[["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22]]
0
68
#include <bits/stdc++.h> using namespace std; int main() { long long x, happiness = 0; cin >> x; while (x > 500) { x -= 500; happiness += 1000; } while (x > 5) { x -= 5; happiness += 5; } cout << happiness << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, happiness = 0; cin >> x; while (x >= 500) { x -= 500; happiness += 1000; } while (x >= 5) { // cout << x << " " << happiness << endl; x -= 5; happiness += 5; } cout << happiness << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
65
import sys input = sys.stdin.readline x = int(input()) res = 1000 * (x // 500) + 5 * ((x - x // 1000 * 1000) // 5) print(res)
import sys input = sys.stdin.readline x = int(input()) res = 1000 * (x // 500) + 5 * ((x - x // 500 * 500) // 5) print(res)
[["-", 31, 23, 0, 657, 12, 657, 31, 657, 12, 612], ["+", 31, 23, 0, 657, 12, 657, 31, 657, 12, 612], ["-", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612]]
5
46
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; if (x % (ll)500 == 0) cout << (x % (ll)500) * (ll)1000 << endl; else if (x % (ll)500 != 0) cout << (x / (ll)500) * (ll)1000 + ((x % (ll)500) / (ll)5) * (ll)5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; if (x % (ll)500 == 0) cout << (x / (ll)500) * (ll)1000 << endl; else if (x % (ll)500 != 0) cout << (x / (ll)500) * (ll)1000 + ((x % (ll)500) / (ll)5) * (ll)5 << endl; return 0; }
[["-", 31, 16, 12, 16, 31, 23, 0, 16, 17, 109], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 85]]
1
108
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; if (x % 500 == 0) cout << (x % 500) * 1000 << endl; else if (x % 500 != 0) cout << (x / 500) * 1000 + ((x % 500) / 5) * 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; if (x % 500 == 0) cout << (x / 500) * 1000; else if (x % 500 != 0) cout << (x / 500) * 1000 + ((x % 500) / 5) * 5 << endl; return 0; }
[["-", 31, 16, 12, 16, 31, 23, 0, 16, 17, 109], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 85], ["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 57, 64, 1, 0, 16, 12, 22]]
1
76