/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

#define ll long long

void solve()
{
   ll n; cin>>n;
   ll m=n/500;
   ll o=n%500;
   cout<<(m*1000)+(o/5)*5<<endl;
   
}

int main()
{
    ll t=1;
   // cin>>t;
    while(t--) solve();
    return 0;
}

Information

Submit By
Type
Pretest
Problem
P1132 Festivity Frenzy!
Language
C++17 (G++ 13.2.0)
Submit At
2025-02-17 14:56:11
Judged At
2025-02-17 14:56:11
Judged By
Score
10
Total Time
1ms
Peak Memory
540.0 KiB