Accepted
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long lanterns = N / 500;
long long remaining_tokens = N % 500;
long long banners = remaining_tokens / 5;
long long festivity_points = (lanterns * 1000) + (banners * 5);
cout << festivity_points << 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:42:03
- Judged At
- 2025-02-17 14:42:03
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 536.0 KiB