Accepted
Code
/*
BISMILLAHIR RAHMANIR RAHIM
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
void solve()
{
int n;cin>>n;
int ans=0;
ans+=1000*(n/500);
n%=500;
ans+=(5*(n/5));
cout<<ans<<endl;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t=1;
// cin>>t;
while(t--)
{
solve();
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1132 Festivity Frenzy!
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-02-17 18:35:02
- Judged At
- 2025-02-17 18:35:02
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 564.0 KiB