Accepted
Code
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double dl;
#define gcd __gcd
#define endl "\n"
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
#define mem(a,b) memset(a,b,sizeof(a))
int main()
{
optimize();
ll a,b,c,d,e,f; cin>>a;
b=a/500;
c=a%500;
d= c/5;
cout<<(b*1000)+(d*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 15:26:46
- Judged At
- 2025-02-17 15:26:46
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 544.0 KiB