提出 #24172310


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
int main(){
    // int 型の変数(箱)を作る
    int N;

    // cin で入力を受け取ることができる。「>>」で区切ること(<<ではない)
    cin >> N;

    // 求める答えは、10000円支払ったときの1000円札以外のぶん、つまり1000で割った余りである。
    int answer = (10000-N) % 1000;

    // cout を使うと答えを出力することが出来る。「<<」で区切ること(>>ではない)
    // endl で改行する。
    cout << answer << endl;
}

提出情報

提出日時
問題 A - Payment
ユーザ TumoiYorozu
言語 C++ (GCC 9.2.1)
得点 100
コード長 579 Byte
結果 AC
実行時間 10 ms
メモリ 3644 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 17
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
hand_01.txt AC 10 ms 3572 KiB
hand_02.txt AC 2 ms 3408 KiB
hand_03.txt AC 2 ms 3524 KiB
hand_04.txt AC 3 ms 3600 KiB
hand_05.txt AC 2 ms 3412 KiB
random_01.txt AC 2 ms 3408 KiB
random_02.txt AC 2 ms 3404 KiB
random_03.txt AC 2 ms 3568 KiB
random_04.txt AC 3 ms 3568 KiB
random_05.txt AC 1 ms 3624 KiB
random_06.txt AC 2 ms 3400 KiB
random_07.txt AC 2 ms 3644 KiB
random_08.txt AC 1 ms 3528 KiB
random_09.txt AC 2 ms 3460 KiB
random_10.txt AC 2 ms 3452 KiB
sample_01.txt AC 2 ms 3404 KiB
sample_02.txt AC 2 ms 3400 KiB