Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int n;
cin >> n;
n=n-(n%5);
int ans=(n/500)*1000;
ans+=n-(ans/2);
cout << ans;
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:47:06
- Judged At
- 2025-02-17 14:47:06
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 772.0 KiB