Accepted
Code
// Author: Mushfiq R.
#include <bits/stdc++.h>
#define endl "\n"
#define ll long long
#define ld long double
#define ull unsigned long long
#define vsort(v) sort(v.begin(), v.end())
#define rsort(v) sort(v.begin(), v.end(), greater<int>())
#define fastIO (ios_base::sync_with_stdio(false), cin.tie(NULL));
using namespace std;
int main()
{
fastIO;
int n;
cin >> n;
ll points = (n / 500) * 1000;
ll remain = ((n % 500) / 5) * 5;
cout << points + remain;
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:28
- Judged At
- 2025-02-17 14:48:28
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 772.0 KiB