Submission #17715352


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef pair<string,string> Pstring;
typedef pair<double,double> Pdouble;


#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define Precision13 cout << fixed << setprecision(13)
const double PI=3.14159265358979323846;
const int MAX = 510000;
const int MOD = 1000000007;
const int INF = 1<<29;
using Graph = vector<vector<int>>;


int main()
{
  ll n;
  cin >> n;
  if(n%1000==0){
    cout << 0 << endl;
  }else{
    cout << 1000 - n%1000 << endl;
  }
  
}

Submission Info

Submission Time
Task A - Payment
User takkey
Language C++ (GCC 9.2.1)
Score 100
Code Size 634 Byte
Status AC
Exec Time 10 ms
Memory 3588 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 17
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 10 ms 3428 KiB
hand_02.txt AC 2 ms 3588 KiB
hand_03.txt AC 2 ms 3532 KiB
hand_04.txt AC 3 ms 3512 KiB
hand_05.txt AC 4 ms 3536 KiB
random_01.txt AC 3 ms 3440 KiB
random_02.txt AC 2 ms 3564 KiB
random_03.txt AC 1 ms 3372 KiB
random_04.txt AC 6 ms 3488 KiB
random_05.txt AC 2 ms 3516 KiB
random_06.txt AC 2 ms 3428 KiB
random_07.txt AC 2 ms 3568 KiB
random_08.txt AC 2 ms 3536 KiB
random_09.txt AC 2 ms 3560 KiB
random_10.txt AC 2 ms 3488 KiB
sample_01.txt AC 2 ms 3568 KiB
sample_02.txt AC 2 ms 3380 KiB