/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 532.0 KiB
#2 Accepted 2ms 452.0 KiB
#3 Accepted 2ms 380.0 KiB
#4 Accepted 2ms 328.0 KiB
#5 Accepted 2ms 332.0 KiB
#6 Accepted 2ms 476.0 KiB
#7 Accepted 2ms 380.0 KiB
#8 Accepted 3ms 492.0 KiB
#9 Accepted 2ms 488.0 KiB
#10 Accepted 2ms 488.0 KiB
#11 Accepted 2ms 492.0 KiB
#12 Accepted 2ms 388.0 KiB
#13 Accepted 2ms 496.0 KiB
#14 Accepted 2ms 492.0 KiB

Code

#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define endl '\n'
#define Endl '\n'

using namespace std;

const int N = 2e5 + 5;
int tc, n, m, a[N];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); // cout.tie(0);
    cin >> n;
    ll Ans = (n / 500) * 1000;
    n = n % 500;
    Ans += n / 5 * 5;
    cout << Ans << endl;

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1132 Festivity Frenzy!
Contest
Lockout contest round-1 ( Mazharul Islam vs Thakur Emon)
Language
C++17 (G++ 13.2.0)
Submit At
2024-11-04 17:05:49
Judged At
2024-11-11 02:33:45
Judged By
Score
100
Total Time
3ms
Peak Memory
532.0 KiB