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
a = int(input()) print(a//5*500+a//5*5)
a = int(input()) print(a//500*500+a//5*5)
[["-", 3, 4, 0, 657, 31, 657, 31, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 657, 31, 657, 12, 612]]
5
22
#include <bits/stdc++.h> using namespace std; int main() { long x; long happy = 0; cin >> x; for (x; x > 500; x -= 500) { happy += 1000; } for (x; x > 5; x -= 5) { happy += 5; } cout << happy << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; long happy = 0; cin >> x; for (x; x >= 500; x -= 500) { happy += 1000; } for (x; x >= 5; x -= 5) { happy += 5; } cout << happy << endl; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20]]
1
66
x = int(input()) a=0 b=0 aper=0 if x!=0: a=x//500 aper=x%500 if aper != 0: b= b/5 bper = b%5 result = (a * 1000) + (b*5) print(int(result))
x = int(input()) a=0 b=0 aper=0 if x!=0: a=x//500 aper=x%500 if aper != 0: b= aper//5 bper = aper%5 result = (a * 1000) + (b*5) print(int(result))
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 676]]
5
67
X=int(input()) w=int(X/500)*1000 X=int(X/500) x=int(X/5)*5 print(w+x)
X=int(input()) w=int(X/500)*1000 X=int(X%500) x=int(X/5)*5 print(w+x)
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 109]]
5
42
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long int ll; int main() { ll X; cin >> X; ll ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long int ll; int main() { ll X; cin >> X; ll ...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85]]
1
84
#include <bits/stdc++.h> using namespace std; #define ll long long #define elif else if #define ffast \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define elif else if #define ffast \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
88
X = int(input()) n_500 = X / 500 n_5 = (X % 500) / 5 ans = 1000 * n_500 + 5 * n_5 print(int(ans))
X = int(input()) n_500 = X // 500 n_5 = (X % 500) // 5 ans = 1000 * n_500 + 5 * n_5 print(int(ans))
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
38
#include "algorithm" #include "bitset" #include "cstring" #include "ctime" #include "iomanip" #include "iostream" #include "map" #include "math.h" #include "numeric" #include "queue" #include "set" #include "stack" #include "string" #include "vector" #include "ext/pb_ds/assoc_container.hpp" // Common file #include "ex...
#include "algorithm" #include "bitset" #include "cstring" #include "ctime" #include "iomanip" #include "iostream" #include "map" #include "math.h" #include "numeric" #include "queue" #include "set" #include "stack" #include "string" #include "vector" #include "ext/pb_ds/assoc_container.hpp" // Common file #include "ex...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 12, 23, 0, 25]]
1
484
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define FAST ios_base::sync_with_stdio(false); #define FO cout.tie(NULL); #define FI cin.tie(NULL); #define IN cin >> #define OUT cout << #define loop(i, a, n) for (int i = a; i < n; i++) #define rloop(i, a, n) for (int i = a; i >= n; i--) #define endl "\n"; #define p...
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define FAST ios_base::sync_with_stdio(false); #define FO cout.tie(NULL); #define FI cin.tie(NULL); #define IN cin >> #define OUT cout << #define loop(i, a, n) for (int i = a; i < n; i++) #define rloop(i, a, n) for (int i = a; i >= n; i--) #define endl "\n"; #define p...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
462
#include <iostream> #include <math.h> #include <string.h> using namespace std; int main() { long int x; cin >> x; long int ans, ans2, x2; ans = x / 500; ans *= 1000; x2 = x % 1000; ans2 = x2 / 5; ans2 *= 5; cout << ans + ans2 << endl; return 0; }
#include <iostream> #include <math.h> #include <string.h> using namespace std; int main() { long int x; cin >> x; long int ans, ans2, x2; ans = x / 500; ans *= 1000; x2 = x % 500; ans2 = x2 / 5; ans2 *= 5; cout << ans + ans2 << endl; return 0; }
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
69
x = gets.to_i m, n = x.divmod(500) a1 = m * 100 + (n / 5) * 5 print a1
x = gets.to_i m, n = x.divmod(500) a1 = m * 1000 + (n / 5) * 5 print a1
[["-", 0, 493, 0, 662, 12, 738, 31, 738, 12, 612], ["+", 0, 493, 0, 662, 12, 738, 31, 738, 12, 612]]
4
30
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long int li; const ll mod = 1000000007; const ll inf = 1000000000000000000; typedef vector<int> vi; typedef vector<li> vli; typedef vector<ll> vll; typedef vector<string> vs; typedef vector<vi> vvi; typedef vector<vli> vvli; typedef vect...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long int li; const ll mod = 1000000007; const ll inf = 1000000000000000000; typedef vector<int> vi; typedef vector<li> vli; typedef vector<ll> vll; typedef vector<string> vs; typedef vector<vi> vvi; typedef vector<vli> vvli; typedef vect...
[["-", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 107]]
1
279
import math def main(): # arg = getInput(input()) arg = getInput(1024) ans = process(arg) print(ans) def process(arg): yen500 = math.floor(arg / 500) amari = arg % 500 yen5 = math.floor(amari / 5) ans = 1000 * yen500 ans = ans + yen5 * 5 return ans def getInput(input): ...
import math def main(): arg = getInput(input()) # arg = getInput(1024) ans = process(arg) print(ans) def process(arg): yen500 = math.floor(arg / 500) amari = arg % 500 yen5 = math.floor(amari / 5) ans = 1000 * yen500 ans = ans + yen5 * 5 return ans def getInput(input): ...
[["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
129
n = int(input) print(int(n//500*1000+(n%500)//5*5))
n = int(input()) print(int(n//500*1000+(n%500)//5*5))
[["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
27
#include <bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<ll> #define pi pair<ll, ll> #define vp vector<pi> #define mp map<ll, ll> #define pb push_back #define endl '\n' #define fast \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<ll> #define pi pair<ll, ll> #define vp vector<pi> #define mp map<ll, ll> #define pb push_back #define endl '\n' #define fast \ ios_base::sync_with_stdio(false); ...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109]]
1
88
#include <bits/stdc++.h> using namespace std; int main() { long long x, y, z, a, b; cin >> x; y = x / 500; z = x % 500; a = z % 5; cout << y * 1000 + a * 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, y, z, a, b; cin >> x; y = x / 500; z = x % 500; a = z / 5; cout << y * 1000 + a * 5 << endl; return 0; }
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]]
1
61
X = int(input()) count_five_hundred = int(X // 500) count_five = int((X % 1000) // 5) max_happiness = count_five_hundred * 1000 + count_five * 5 print(max_happiness)
X = int(input()) count_five_hundred = int(X // 500) count_five = int((X % 500) // 5) max_happiness = count_five_hundred * 1000 + count_five * 5 print(max_happiness)
[["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]]
5
41
#include <bits/stdc++.h> using namespace std; typedef long double LD; typedef long long int ll; #define pb push_back #define mp make_pair #define REP(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FORD(i, a, b) for (ll i = a; ...
#include <bits/stdc++.h> using namespace std; typedef long double LD; typedef long long int ll; #define pb push_back #define mp make_pair #define REP(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FORD(i, a, b) for (ll i = a; ...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13], ["-", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13]]
1
246
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define erep(i, n) for (int i = 0; i <= n; i++) #define rep1(i, n) for (int i = 1; i < n; i++) #define erep1(i, n) for (int i = 1; i <= n; i++) typedef long long ll; #define vint vector<int> #define vvint vector<vector<int>> #de...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define erep(i, n) for (int i = 0; i <= n; i++) #define rep1(i, n) for (int i = 1; i < n; i++) #define erep1(i, n) for (int i = 1; i <= n; i++) typedef long long ll; #define vint vector<int> #define vvint vector<vector<int>> #de...
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13]]
1
117
# 1行、1変数を受け取るとき s = int(input()) print(int(s / 500) * 1000) + (int(s % 10 / 5) * 5)
# 1行、1変数を受け取るとき s = int(input()) print((int(s / 500) * 1000) + (int(s % 500 / 5) * 5))
[["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["-", 31, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 31, 652, 3, 4, 0, 657, 31, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]]
5
33
class InputLine def self.to_s gets.chomp end def self.to_i InputLine.to_s.to_i end def self.to_f InputLine.to_s.to_f end def self.to_sa InputLine.to_s.split(' ') end def self.to_ia InputLine.to_sa.map(&:to_i) end def self.to_fa InputLine.to_sa.map(&:to_f) end end...
class InputLine def self.to_s gets.chomp end def self.to_i InputLine.to_s.to_i end def self.to_f InputLine.to_s.to_f end def self.to_sa InputLine.to_s.split(' ') end def self.to_ia InputLine.to_sa.map(&:to_i) end def self.to_fa InputLine.to_sa.map(&:to_f) end end...
[["-", 0, 735, 8, 736, 0, 662, 12, 738, 17, 109], ["+", 0, 735, 8, 736, 0, 662, 12, 738, 17, 85]]
4
126
#include <bits/stdc++.h> using namespace std; int main() { long X; cin >> X; long a, b; a = X / 500; X = X - a; b = X / 5; cout << a * 1000 + b * 5 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long X; cin >> X; long a, b; a = X / 500; X = X - a * 500; b = X / 5; cout << a * 1000 + b * 5 << endl; return 0; }
[["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 12, 13]]
1
57
money_val = int(input()) if money_val < 5: print(0) elif money_val < 500: print(money_val // 5) else: fivehun_num = (money_val // 500) five_num = money_val - (500*fivehun_num) five_num = five_num // 5 print((fivehun_num*1000) + (five_num*5))
money_val = int(input()) if money_val < 5: print(0) elif money_val < 500: print((money_val // 5)*5) else: fivehun_num = (money_val // 500) five_num = money_val - (500*fivehun_num) five_num = five_num // 5 print((fivehun_num*1000) + (five_num*5))
[["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48]]
5
65
def solve(): N = int(input()) a = N//500 s = str(N) b = int(s[-3:]) // 5 return a*1000 + b*5 print(solve())
def solve(): N = int(input()) a = N//500 s = str(N) b = (N - a * 500) // 5 return a*1000 + b*5 print(solve())
[["-", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22], ["-", 12, 657, 31, 652, 3, 4, 0, 206, 51, 22], ["-", 12, 657, 31, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 31, 22], ["-", 3, 4, 0, 206, 206, 663, 0, 664, 28, 612], ["-", 31, 652, 3, 4, 0, 206, 206, 663, 0, 102], ["-", 12, 657, 31, 652, 3, 4, 0, 20...
5
51
import math x = int(input()) ans = 0 if math.floor(x/500) >1 : ans += math.floor(x/500)*1000 x -= math.floor(x/500)*500 if x > 0 and math.floor(x/5) >1 : ans += math.floor(x/5)*5 print(ans)
import math x = int(input()) ans = 0 if math.floor(x/500) >=1 : ans += math.floor(x/500)*1000 x -= math.floor(x/500)*500 if x > 0 and math.floor(x/5) >=1 : ans += math.floor(x/5)*5 print(ans)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]]
5
81
#include <cmath> #include <iomanip> #include <iostream> #include <vector> int b() { long long a; std::cin >> a; long long thousand = a / 500; long long remind = a - thousand * 500; long long one = remind / 5; std::cout << thousand * 1000 + one; return 0; } int main(int argc, const char *argv[]) { b...
#include <cmath> #include <iomanip> #include <iostream> #include <vector> int b() { long long a; std::cin >> a; long long thousand = a / 500; long long remind = a - thousand * 500; long long one = remind / 5; std::cout << thousand * 1000 + one * 5; return 0; } int main(int argc, const char *argv[]) {...
[["+", 0, 1, 0, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 12, 16, 12, 16, 12, 13]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; int s = 0, g = 0; while (x - 500 > 0) { x = x - 500; s++; } while (x - 5 > 0) { x = x - 5; g++; } cout << s * 1000 + g * 5; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long s = 0, g = 0; while (x - 500 >= 0) { x = x - 500; s++; } while (x - 5 >= 0) { x = x - 5; g++; } cout << s * 1000 + g * 5; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
77
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vs = vector<string>; using vvs = vector<vs>; using vc = vector<char>; using vvc = vector<vc>; using vb = vector<boo...
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vs = vector<string>; using vvs = vector<vs>; using vc = vector<char>; using vvc = vector<vc>; using vb = vector<boo...
[["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 12, 16, 12, 23, 0, 25]]
1
521
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (a / 500) * 1000 + (a % 10) * 5 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (a / 500) * 1000 + (a % 500) / 5 * 5 << endl; }
[["-", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 12, 13]]
1
40
#include <iostream> using namespace std; int main() { long long int X; cin >> X; long long int gohyaku = X / 500; long long int go = (X % 500) / 5; cout << gohyaku * 1000 + go << endl; }
#include <iostream> using namespace std; int main() { long long int X; cin >> X; long long int gohyaku = X / 500; long long int go = (X % 500) / 5; cout << gohyaku * 1000 + go * 5 << endl; }
[["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 13]]
1
53
#include <bits/stdc++.h> using namespace std; int main() { long n, t = 0; cin >> n; t += n / 500 * 1000; n -= t; t += n / 5 * 5; cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, t = 0; cin >> n; t += n / 500 * 1000; n -= n / 500 * 500; t += n / 5 * 5; cout << t << endl; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 85], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
49
a = gets.chop.to_i sum = 0 sum1 = 0 while a - 500 > 0 a = a - 500 sum += 1 end while a - 5 > 0 a = a - 5 sum1 += 1 end puts sum * 1000 + sum1 * 5
a = gets.chomp.to_i sum = 0 sum1 = 0 while a - 500 >= 0 a = a - 500 sum += 1 end while a - 5 >= 0 a = a - 5 sum1 += 1 end puts sum * 1000 + sum1 * 5
[["-", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 47], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 20]]
4
51
#include <bits/stdc++.h> #define ll long long #define ld long double #define ff first // For pairs #define ss second // For pairs #define sz(a) int((a).size()) // Function to determine size of any container #define pb push_back // Pushback to vector #define mp make_pair // Mak...
#include <bits/stdc++.h> #define ll long long #define ld long double #define ff first // For pairs #define ss second // For pairs #define sz(a) int((a).size()) // Function to determine size of any container #define pb push_back // Pushback to vector #define mp make_pair // Mak...
[["-", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13]]
1
144
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iostream> using namespace std; using namespace __gnu_pbds; #define li long #define ll long long #define ull unsigned long long #define ff first #define ss second #define pii pair<int, int> #define pli pair<l...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iostream> using namespace std; using namespace __gnu_pbds; #define li long #define ll long long #define ull unsigned long long #define ff first #define ss second #define pii pair<int, int> #define pli pair<l...
[["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 31, 16, 12, 16, 12, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 16, 12, 16, 12, 23, 0, 25]]
1
222
X = int(input()) ans = 0 ans += (X // 500) * 1000 ans += ((X % 500) // 5) * 5
X = int(input()) ans = 0 ans += (X // 500) * 1000 ans += ((X % 500) // 5) * 5 print(ans)
[["+", 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> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) (x).begin(), (x).end() #define pb push_back using namespace std; using ll = long long; using P = pair<int, int>; int main() { ll a, ans; cin >> a; ans = a / 500 * 1000; ans += a % 500; cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) (x).begin(), (x).end() #define pb push_back using namespace std; using ll = long long; using P = pair<int, int>; int main() { ll a, ans; cin >> a; ans = a / 500 * 1000; ans += (a % 500 / 5) * 5; cout << ans << endl; }
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 85], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
74
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int h = (n / 500) * 1000; h = h + (n % 500); cout << h; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int h = (n / 500) * 1000; h = h + ((n % 500) / 5) * 5; cout << h; }
[["+", 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
48
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { long N; cin >> N; cout << (N / 500 * 1000) + (N % 1000) / 5 * 5 << endl; return 0; }
#include <iomanip> #include <iostream> #include <math.h> using namespace std; int main() { long N; cin >> N; cout << (N / 500 * 1000) + (N % 500) / 5 * 5 << endl; return 0; }
[["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
48
import bisect,collections,copy,itertools,math,string def I(): return int(input()) def S(): return input() def LI(): return list(map(int,input().split())) def LS(): return list(input().split()) ################################################## X = I() _500 = X//500 _nokori = (X%500)//5 print(_nokori) print(_500*1000+_n...
import bisect,collections,copy,itertools,math,string def I(): return int(input()) def S(): return input() def LI(): return list(map(int,input().split())) def LS(): return list(input().split()) ################################################## X = I() _500 = X//500 _nokori = (X%500)//5 print(_500*1000+_nokori*5)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
5
104
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <u...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string.h> #include <string> #include <u...
[["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
115
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = (a); i < (n); i++) using namespace std; using ll = long long; int main() { ll x; cin >> x; ll h500 = x / 500; x %= 100; ll h5 = x / 5; cout << h500 * 1000 + h5 * 5 << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = (a); i < (n); i++) using namespace std; using ll = long long; int main() { ll x; cin >> x; ll h500 = x / 500; x %= 500; ll h5 = x / 5; cout << h500 * 1000 + h5 * 5 << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
68
x = int(input()) a = [500, 100, 50, 5, 1] b = [0, 0, 0, 0, 0] for i in range(5): b[i] = x // a[i] x = x % a[i] print(b[0] * 1000 + b[3]*5)
x = int(input()) a = [500, 5, 100, 50, 1] b = [0, 0, 0, 0, 0] for i in range(5): b[i] = x // a[i] x = x % a[i] print(b[0] * 1000 + b[1]*5)
[["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["-", 3, 4, 0, 657, 12, 657, 31, 206, 206, 612], ["+", 3, 4, 0, 657, 12, 657, 31, 206, 206, 612]]
5
77
X = int(input()) happiness = 0 if X >= 1000: happiness += (X//1000)*2*1000 X = X%1000 happiness += (X//5)*5 print(happiness)
X = int(input()) happiness = 0 if X >= 500: happiness += (X//500)*1000 X = X%500 happiness += (X//5)*5 print(happiness)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 12, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 1, 0, 677, 12, 657, 31, 657, 17, 48], ["-", 0, 1, 0, 677, 12, 657, 31, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 662, 12...
5
45
money = int(input()) fh = n // 500 money -= 500 * fh goen = money // 5 point = 1000 * fh + 5 * goen print(point)
money = int(input()) fh = money // 500 money -= 500 * fh goen = money // 5 point = 1000 * fh + 5 * goen print(point)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22]]
5
36
///...................SUBHASHIS MOLLICK.................../// ///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING..../// ///.............ISLAMIC UNIVERSITY,BANGLADESH............./// ///....................SESSION-(14-15)..................../// #include <bits/stdc++.h> using namespace std; #define sf(a) scanf("%d", ...
///...................SUBHASHIS MOLLICK.................../// ///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING..../// ///.............ISLAMIC UNIVERSITY,BANGLADESH............./// ///....................SESSION-(14-15)..................../// #include <bits/stdc++.h> using namespace std; #define sf(a) scanf("%d", ...
[["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 48], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
225
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int a = n / 500; n -= a * 500; cout << 1ll * a * 1000 + n % 5 * 5 << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int a = n / 500; n -= a * 500; cout << 1ll * a * 1000 + n / 5 * 5 << endl; return 0; }
[["-", 31, 16, 12, 16, 12, 16, 31, 16, 17, 109], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85]]
1
53
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll x; cin >> x; ll ure = 0; ure += (x / 500) * 1000; x %= 500; ure += x / 5; cout << ure; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll x; cin >> x; ll ure = 0; ure += (x / 500) * 1000; x %= 500; ure += (x / 5) * 5; cout << ure; }
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
62
n = int(input()) print(int(n / 500) * 1000 + int((n % 500) / 5))
n = int(input()) print(int(n / 500) * 1000 + int((n % 500) / 5) * 5)
[["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]]
5
30
X = int(input()) ans = 0 ans += (X // 500) * 1000 res = X % 1000 ans += (res // 5) * 5 print(ans)
X = int(input()) ans = 0 ans += (X // 500) * 1000 res = X % 500 ans += (res // 5) * 5 print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]]
5
38
n = int(input()) ans = 0 ans += (n // 500)*1000 n -= 500*(n // 500) ans += (n % 5)*5 print(ans)
n = int(input()) ans = 0 ans += (n // 500)*1000 n -= 500*(n // 500) ans += (n // 5)*5 print(ans)
[["-", 0, 677, 12, 657, 31, 23, 0, 657, 17, 109], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 17, 676]]
5
42
#include <bits/stdc++.h> using namespace std; #define pb push_back #define int long long #define endl "\n" #define pii pair<int, int> #define ff first #define ss second #define mii map<int, int> #define si set<int> #define sti stack<int> #define qi queue<int> #define vi vector<int> #define pq priority_queue<int> #defin...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define int long long #define endl "\n" #define pii pair<int, int> #define ff first #define ss second #define mii map<int, int> #define si set<int> #define sti stack<int> #define qi queue<int> #define vi vector<int> #define pq priority_queue<int> #defin...
[["-", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
100
import math num = int(input("num: ")) c_500 = math.floor(num / 500) num2 = num - c_500 * 500 c_5 = math.floor(num2/5) print(c_500 * 1000 +c_5 * 5)
import math num = int(input()) c_500 = math.floor(num / 500) num2 = num - c_500 * 500 c_5 = math.floor(num2/5) print(c_500 * 1000 +c_5 * 5)
[["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 3, 4, 0, 652, 3, 4, 0, 557, 0, 655]]
5
50
X = int(input()) u = 1000*(X//500) + 5*((X%1000)//5) print(u)
X = int(input()) u = 1000*(X//500) + 5*((X%500)//5) print(u)
[["-", 12, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 12, 612]]
5
33
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; int main() { ll x; cin >> x; ll a, b; a = x / 500; x -= a; b = x / 5; cout << 1000 * a + 5 * b << endl; }
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; int main() { ll x; cin >> x; ll a, b; a = x / 500; x -= a * 500; b = x / 5; cout << 1000 * a + 5 * b << endl; }
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
63
#include <iostream> using namespace std; int main() { int64_t x; cin >> x; int64_t ans = 1000 * (x / 500); x %= 1000; ans += 5 * (x / 5); cout << ans << "\n"; return 0; }
#include <iostream> using namespace std; int main() { int64_t x; cin >> x; int64_t ans = 1000 * (x / 500); x %= 500; ans += 5 * (x / 5); cout << ans << "\n"; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
55
import math X = int(input()) happy_1000 = X//500 X = math.floor(X/500) happy_5 = X//5 res = happy_1000*1000 + happy_5*5 print(res)
import math X = int(input()) happy_1000 = X//500 X = math.floor(X%500) happy_5 = X//5 res = happy_1000*1000 + happy_5*5 print(res)
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 109]]
5
43
s = int(input()) res = (s//500)*1000 s -= (s//500)*500 res += (s%5)*5 print(str(res))
s = int(input()) res = (s//500)*1000 s -= (s//500)*500 res += (s//5)*5 print(str(res))
[["-", 0, 677, 12, 657, 31, 23, 0, 657, 17, 109], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 17, 676]]
5
42
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" "unsafe" ) func main() { X := sc.nextInt() happy := 0 for { if X < 500 { break } X = X - 500 happy += 1000 } happy += 5 * (X % 5) // for { // X = X / 5 // if X <= 0 { // break // } // happy += 5 // } fmt.Println...
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" "unsafe" ) func main() { X := sc.nextInt() happy := 0 for { if X < 500 { break } X = X - 500 happy += 1000 } // for { // if X < 5 { // break // } // X = X - 5 // happy += 5 // } happy += 5 * (X / 5) fmt.Println(...
[["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["+", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["-", 12, 432, 0, 16, 12, 23, 0, 16, 17, 109], ["+", 12, 432, 0, 16, 12, 23, 0, 16, 17, 85]]
7
1,064
#include <bits/stdc++.h> using namespace std; long long x, a; int main() { cin >> x; a = x / 500; x %= 500; cout << a * 1000 + x % 5 * 5 << endl; }
#include <bits/stdc++.h> using namespace std; long long x, a; int main() { cin >> x; a = x / 500; x %= 500; cout << a * 1000 + x / 5 * 5 << endl; }
[["-", 31, 16, 12, 16, 12, 16, 31, 16, 17, 109], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85]]
1
46
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll x, x2, x1, x3, h = 0; cin >> x; x1 = x / 500; h = h + (2 * x1 * 500); x2 = x % 1000; x3 = x2 / 5; h = h + (x3 * 5); cout << h; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll x, x2, x1, x3, h = 0; cin >> x; x1 = x / 500; h = h + (2 * x1 * 500); x2 = x % 500; x3 = x2 / 5; h = h + (x3 * 5); cout << h; return 0; }
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
79
/* ⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿...
/* ⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⡎...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
62
X = int(input()) sen = X // 500 amari = X % 500 go = amari // 5 ans = sen * 1000 + gp * 5
X = int(input()) sen = X // 500 amari = X % 500 go = amari // 5 ans = sen * 1000 + go * 5 print(ans)
[["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 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
32
// https://codeforces.com/contest/1328/problem/A // BROWNIE TK #include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb p...
// https://codeforces.com/contest/1328/problem/A // BROWNIE TK #include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pb p...
[["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13]]
1
441
#create date: 2020-03-28 21:01 import sys stdin = sys.stdin def ns(): return stdin.readline().rstrip() def ni(): return int(ns()) def na(): return list(map(int, stdin.readline().split())) def main(): x = ni() print(1000*(x//500) + 5*((x % 100)//5)) if __name__ == "__main__": main()
#create date: 2020-03-28 21:01 import sys stdin = sys.stdin def ns(): return stdin.readline().rstrip() def ni(): return int(ns()) def na(): return list(map(int, stdin.readline().split())) def main(): x = ni() l = x % 100 print(1000*(x//500) + 5*((x % 500)//5)) if __name__ == "__main__": main()
[["+", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 12, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 12, 61...
5
100
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; int flag = 1; long long ans = 0; if (x / 500 != 0) { ans += (x / 500) * 1000; x -= (x / 500) * 500; } if (x / 5 != 0) { ans += (x / 5) * 10; x -= (x / 5) * 5; } cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; int flag = 1; long long ans = 0; if (x / 500 != 0) { ans += (x / 500) * 1000; x -= (x / 500) * 500; } if (x / 5 != 0) { ans += (x / 5) * 5; x -= (x / 5) * 5; } cout << ans; }
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
95
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; ll sum = 1000 * (n / 500); n %= 500; sum += 5 * (n % 5); cout << sum << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; ll sum = 1000 * (n / 500); n %= 500; sum += 5 * (n / 5); cout << sum << endl; return 0; }
[["-", 0, 11, 12, 16, 12, 23, 0, 16, 17, 109], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 85]]
1
56
x=int(input()) cnt = 0 q = x // 500 cnt += (q * 1000) w = x % 500 e = w // 5 cnt += (e * 5)
x=int(input()) cnt = 0 q = x // 500 cnt += (q * 1000) w = x % 500 e = w // 5 cnt += (e * 5) print(cnt)
[["+", 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
40
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; cin.ignore(); ll x_1000 = x / 500; ll xp1000 = x % 500; ll xp1000_5 = xp1000 % 5; ll ans = 1000 * x_1000 + 5 * xp1000_5; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll x; cin >> x; cin.ignore(); ll x_1000 = x / 500; ll xp1000 = x % 500; ll xp1000_5 = xp1000 / 5; ll ans = 1000 * x_1000 + 5 * xp1000_5; cout << ans << endl; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85]]
1
72
#include <bits/stdc++.h> ///#include <ext/pb_ds/assoc_container.hpp> ///#include <ext/pb_ds/tree_policy.hpp> using namespace std; /// using namespace __gnu_pbds; /// template<typename T> using orderset = /// tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>; #define CIN ...
#include <bits/stdc++.h> ///#include <ext/pb_ds/assoc_container.hpp> ///#include <ext/pb_ds/tree_policy.hpp> using namespace std; /// using namespace __gnu_pbds; /// template<typename T> using orderset = /// tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>; #define CIN ...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
1
365
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132]]
1
168
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define FUP(i, x, y) for (int i = (x); i <= (y); i++) #define FDW(i, x, y) for (int i = (x); i >= (y); i--) #define MAXN 100010 #define INF 0x3f3f3f3f #define MOD 1000000007 #define ll long long #define db ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define FUP(i, x, y) for (int i = (x); i <= (y); i++) #define FDW(i, x, y) for (int i = (x); i >= (y); i--) #define MAXN 100010 #define INF 0x3f3f3f3f #define MOD 1000000007 #define ll long long #define db ...
[["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 78], ["-", 0, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 12, 13]]
1
185
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define rep(i, x, n) for (int i = x; i <= n; i++) #define per(i, n, x) for (int i = n; i <= x; i--) using namespace std; typedef long long ll; typedef pair<int, int> pii; const int inf = 0x3f3f3f3f; const int maxn = 5005; const int maxm = ...
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define rep(i, x, n) for (int i = x; i <= n; i++) #define per(i, n, x) for (int i = n; i <= x; i--) using namespace std; typedef long long ll; typedef pair<int, int> pii; const int inf = 0x3f3f3f3f; const int maxn = 5005; const int maxm = ...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
128
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; const int N = 1e5 + 10; int a[N]; int main() { ll k; cin >> k; ll ans = k / 1000 * 2000; k %= 1000; ans += k / 5 * 5; cout << ans << '\n'; return 0; }
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; const int N = 1e5 + 10; int a[N]; int main() { ll k; cin >> k; ll ans = k / 500 * 1000; k %= 500; ans += k / 5 * 5; cout << ans << '\n'; return 0; }
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
71
X = int(input()) print(1000*(X//500) + (X%500)//5)
X = int(input()) print(1000*(X//500) + 5*((X%500)//5))
[["+", 0, 652, 3, 4, 0, 657, 12, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["+", 3, 4, 0, 657, 12, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 657, 12, 23, 0, 25]]
5
26
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> using namespace std; typedef long long ll; int main() { ll x; cin >> x; ll ans = 0; ll a = x % 500; ans += (x /= 500) * 1000; ll b = x % 5; ans += (x /= 5) * 5; cout << ans << endl; }
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> using namespace std; typedef long long ll; int main() { ll x; cin >> x; ll ans = 0; ll a = x % 500; ans += (x /= 500) * 1000; ll b = a % 5; ans += (a /= 5) * 5; cout << ans << endl; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 11, 12, 16, 31, 23, 0, 42, 0, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 42, 0, 22]]
1
75
#include <bits/stdc++.h> typedef long long int ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define Rep(i, n, m) for (int i = (n); i < (m); i++) #define Sort(a) sort(a.begin(), a.end()) #define Reverse(a) reverse(a.begin(), a.end()) using namespace std; int main() { ll x, ans = 0; cin >> x; ans += (x / ...
#include <bits/stdc++.h> typedef long long int ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define Rep(i, n, m) for (int i = (n); i < (m); i++) #define Sort(a) sort(a.begin(), a.end()) #define Reverse(a) reverse(a.begin(), a.end()) using namespace std; int main() { ll x, ans = 0; cin >> x; ans += (x / ...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
94
package main import ( "fmt" ) func main() { var a, ans int fmt.Scan(&a) for { aa := a - 500 if aa >= 0 { a = a - 500 ans += 1000 } else { break } } for { aa := a - 5 if aa >= 0 { a = a - 5 ans += 5 } else { break } } fmt.Scan(ans) }
package main import ( "fmt" ) func main() { var a, ans int fmt.Scan(&a) for { aa := a - 500 if aa >= 0 { a = a - 500 ans += 1000 } else { break } } for { aa := a - 5 if aa >= 0 { a = a - 5 ans += 5 } else { break } } fmt.Println(ans) }
[["-", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120], ["+", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120]]
7
103
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; cout << x / 500 * 1000 + x % 500 / 5 * 10; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; cout << x / 500 * 1000 + x % 500 / 5 * 5; return 0; }
[["-", 0, 1, 0, 16, 12, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 12, 16, 12, 16, 12, 13]]
1
39
#include <algorithm> #include <cmath> #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <vector> #define fast ios_base::sync_with_stdio(false...
#include <algorithm> #include <cmath> #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <vector> #define fast ios_base::sync_with_stdio(false...
[["-", 12, 16, 12, 16, 12, 23, 0, 16, 17, 109], ["+", 12, 16, 12, 16, 12, 23, 0, 16, 17, 85]]
1
167
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << (n / 500) * 1000 + (n % 1000) / 5 * 5; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << (n / 500) * 1000 + (n % 500) / 5 * 5; }
[["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
40
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { ll x; cin >> x; ll ans = 0; ll a = x / 500; ans += a * 1000; x -= 500 * a; ll b = x / 5; a...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { ll x; cin >> x; ll ans = 0; ll a = x / 500; ans += a * 1000; x -= 500 * a; ll b = x / 5; a...
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
83
#include <bits/stdc++.h> #define ll long long using namespace std; #define vv vector #define ff first #define ss second #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); typedef pair<ll, ll> pll...
#include <bits/stdc++.h> #define ll long long using namespace std; #define vv vector #define ff first #define ss second #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); typedef pair<ll, ll> pll...
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
83
import sys import numpy as np import itertools from collections import deque sys.setrecursionlimit(10**6) readline = sys.stdin.readline # input X = int(input()) ans = (X//500)*1000 ans += ((X%100)//5)*5 print(ans)
import sys import numpy as np import itertools from collections import deque sys.setrecursionlimit(10**6) readline = sys.stdin.readline # input X = int(input()) ans = (X//500)*1000 ans += ((X%500)//5)*5 print(ans)
[["-", 31, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 31, 23, 0, 657, 31, 23, 0, 657, 12, 612]]
5
62
x = int(input()) t = x//500 f = (x-t)//5 print((t*1000) + (f*5))
x = int(input()) t = x//500 f = (x-t*500)//5 print((t*1000) + (f*5))
[["+", 12, 657, 31, 23, 0, 657, 12, 657, 17, 48], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 12, 612]]
5
36
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define x_ real() #define y_ imag() #define cross(a, b) (conj(a) * (b)).imag() #define dot(a, b) (conj(a) * (b)).real() #define PI acos(-1) #define F first #define S second #define fastIO ios_base...
[["-", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13]]
1
204
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vii; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vii> vvii; typedef pair<ll, ll> pll; const ll N = 200001; const ll MOD = 1000000007; const ll INF = LLONG_MAX; #define all(a) a.begin(), a.end() #define rall(a...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vii; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vii> vvii; typedef pair<ll, ll> pll; const ll N = 200001; const ll MOD = 1000000007; const ll INF = LLONG_MAX; #define all(a) a.begin(), a.end() #define rall(a...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
203
n = int(input()) ans = (n//500) * (1000) rem = ((n%1000)//5) * 5 ans = ans + rem print(ans)
n = int(input()) ans = (n//500) * (1000) rem = ((n%500)//5) * 5 ans = ans + rem print(ans)
[["-", 31, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 31, 23, 0, 657, 31, 23, 0, 657, 12, 612]]
5
41
#include <stdio.h> #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __pri...
#include <stdio.h> #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __pri...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85]]
1
540
#include <bits/stdc++.h> using namespace std; #define ll long long #define pi pair<ll, ll> #define pd pair<ld, ld> #define pb push_back #define inf 1e16 #define mod 998244353 #define en '\n' #define ld long double #define ff first #define ss second #define ull unsigned long long ll pw(ll b, ll r, ll md) { ll ans = 1;...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pi pair<ll, ll> #define pd pair<ld, ld> #define pb push_back #define inf 1e16 #define mod 998244353 #define en '\n' #define ld long double #define ff first #define ss second #define ull unsigned long long ll pw(ll b, ll r, ll md) { ll ans = 1...
[["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13]]
1
162
#include <bits/stdc++.h> typedef long long int lint; #define PI acos(-1) #define INF64 1LL << 60 #define INF32 1 << 29 #define LIMIT(d_in, d_min, d_max) max(d_min, min(d_max, d_in)) #define all(a) (a).begin(), (a).end() #define INV ((long long int)1000000007) using namespace std; void execute() { lint N; cin >> ...
#include <bits/stdc++.h> typedef long long int lint; #define PI acos(-1) #define INF64 1LL << 60 #define INF32 1 << 29 #define LIMIT(d_in, d_min, d_max) max(d_min, min(d_max, d_in)) #define all(a) (a).begin(), (a).end() #define INV ((long long int)1000000007) using namespace std; void execute() { lint N; cin >> ...
[["-", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13]]
1
142
X=int(input()) if X>=5: div500=X//500 X=X-div500*500 div5=X//5 print(div500*1000+div5*5)
X=int(input()) div500=X//500 X=X-div500*500 div5=X//5 print(div500*1000+div5*5)
[["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102]]
5
40
#include <bits/stdc++.h> using namespace std; #include <chrono> #define ll long long #define ld long double #define eb emplace_back #define pb push_back #define mt make_tuple #define tc \ ll t; ...
#include <bits/stdc++.h> using namespace std; #include <chrono> #define ll long long #define ld long double #define eb emplace_back #define pb push_back #define mt make_tuple #define tc \ ll t; ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
459
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll X; cin >> X; ll ans = 0; ans += (X / 500) * 1000; X %= 1000; ans += (X / 5) * 5; cout << ans << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll X; cin >> X; ll ans = 0; ans += (X / 500) * 1000; X %= 500; ans += (X / 5) * 5; cout << ans << '\n'; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
79
#include <bits/stdc++.h> using namespace std; #define ll long long #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
#include <bits/stdc++.h> using namespace std; #define ll long long #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie...
[["+", 31, 16, 12, 16, 12, 16, 31, 16, 17, 85], ["+", 31, 16, 12, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 13]]
1
68
X=int(input()) cnt=0 n=X//1200 X-=n*1200 cnt+=n*1200*2 n=X//5 cnt+=n*5 print(cnt)
X=int(input()) cnt=0 n=X//500 X-=n*500 cnt+=n*1000 n=X//5 cnt+=n*5 print(cnt)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612], ["-", 0, 1, 0, 677, 12, 657, 31, 657, 17, 48], ["-", 0, 1, 0, 677, 12, 657, 31, 657, 12, 612]]
5
42
#include <bits/stdc++.h> using namespace std; int main() { long long int a; cin >> a; long long int n = a / 500, n2 = a - n * 500, n5 = n2 / 5; cout << (long long)(n * 1000) + (n2 * 5); }
#include <bits/stdc++.h> using namespace std; int main() { long long int a; cin >> a; long long int n = a / 500, n2 = a - n * 500, n5 = n2 / 5; cout << (long long)(n * 1000) + (n5 * 5); }
[["-", 0, 16, 12, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 16, 12, 16, 12, 23, 0, 16, 31, 22]]
1
62
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n; cin >> n; cout << (ll)1000 * (n / (...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n; cin >> n; cout << (ll)1000 * (n / (...
[["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 12, 16, 12, 23, 0, 25]]
1
98
#include <bits/stdc++.h> using namespace std; #define ll long long int #define MOD 1000000007 ll findpow(ll a, ll b) { ll cnt = 0, i, j; while (a > 1) { a = a / b; cnt++; } return cnt; } int main() { ll i, j, k, sum, flag = 0, t, m, n; string s1, s2, s; cin >> n; k = n / 500; t = n - k * (50...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define MOD 1000000007 ll findpow(ll a, ll b) { ll cnt = 0, i, j; while (a > 1) { a = a / b; cnt++; } return cnt; } int main() { ll i, j, k, sum, flag = 0, t, m, n; string s1, s2, s; cin >> n; k = n / 500; t = n - k * (50...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]]
1
125
n=int(input()) s=0 s+=(n//500) n=n%500 s+=(n//5) print(s)
n=int(input()) s=0 s+=1000*(n//500) n=n%500 s+=(n//5)*5 print(s)
[["+", 0, 656, 0, 1, 0, 677, 12, 657, 31, 612], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 48], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612]]
5
34
n = int(input()) a = int(n/500) amari = n%500 b = amari/5 ans = int(a*1000+b*5) print(ans)
n = int(input()) a = int(n/500) amari = n%500 b = int(amari/5) ans = int(a*1000+b*5) print(ans)
[["+", 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]]
5
42