Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define e4 ios_base::sync_with_stdio(false); cin.tie(NULL)
#define endl '\n'
#define ll long long
#define test_case int tc;cin>>tc;while(tc--)
int main() {
e4;
ll n,ans=0;
cin>>n;
ans+=(n/500)*1000;
n=n%500;
ans+=(n/5)*5;
cout<<ans;
}
// S m o t h e r e d M a t e !! //
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:53:51
- Judged At
- 2025-02-17 14:53:51
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 772.0 KiB