Accepted
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long lanterns = N / 500;
long long tokens_rem = N % 500;
long long banners = tokens_rem / 5;
long long points_fest = (lanterns * 1000) + (banners * 5);
cout << points_fest << 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 16:35:32
- Judged At
- 2025-02-17 16:35:32
- Judged By
- Score
- 100
- Total Time
- 3ms
- Peak Memory
- 720.0 KiB