Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
#define lcm(a,b) ((a*b)/__gcd(a,b))
const double PI = 2 * acos(0.0);
const int MOD = 1000000007;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
ll n;
cin >> n;
int x = n % 500;
n /= 500;
int y = x / 5;
cout << (n * 1000) + (y * 5) << endl;
}
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:45:57
- Judged At
- 2025-02-17 14:45:57
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB