Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define nl "\n"
#define ws " "
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define MOD 1000000007
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vii;
int main () {
FASTIO
ll n;
cin>>n;
ll ans = 0;
ll x = n / 500;
// ll xrem = n % 500;
ans += x * 1000;
n %= 500;
ans += (n / 5) * 5;
cout<<ans<<nl;
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:45:09
- Judged At
- 2025-02-17 14:45:09
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 560.0 KiB