Accepted
Code
#include <bits/stdc++.h>
using namespace std;
void solve(int cs) {
int64_t j;
cin >> j;
int64_t ans = j / 500 * 1000;
j %= 500;
ans += j / 5 * 5;
cout << ans << "\n";
}
int32_t main() {
ios::sync_with_stdio(!cin.tie(0));
int t = 1;
// cin >> t;
for (int i = 1; i <= t; ++i) {
solve(i);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1132 Festivity Frenzy!
- Contest
- Brain Booster #8
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-02-17 14:36:34
- Judged At
- 2025-02-17 14:36:34
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 536.0 KiB