Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve()
{
ll n; cin>>n;
ll m=n/500;
ll o=n%500;
cout<<(m*1000)+(o/5)*5<<endl;
}
int main()
{
ll t=1;
// cin>>t;
while(t--) solve();
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:56:15
- Judged At
- 2025-02-17 14:56:15
- Judged By
- Score
- 100
- Total Time
- 3ms
- Peak Memory
- 540.0 KiB