Accepted
Code
// Author: Shawn Das Shachin-->(shawn_das)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
#define mod 1000000007
#define srt(v) sort(v.begin(),v.end())
#define rsrt(v) sort(v.rbegin(),v.rend())
#define OPTIMIZE_IO ios::sync_with_stdio(false); cin.tie(nullptr);
int main() {
OPTIMIZE_IO;
ll n;
cin>>n;
ll lan=n/500;
ll vib=(n%500)/5;
cout<<lan*1000+vib*5<<endl;
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:48:02
- Judged At
- 2025-02-17 14:48:02
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB