結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー alcheminalchemin
提出日時 2019-09-20 23:22:31
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 1,429 ms
コンパイル使用メモリ 162,952 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-12 21:54:51
合計ジャッジ時間 2,437 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,352 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,348 KB
testcase_11 WA -
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,352 KB
testcase_16 AC 2 ms
4,352 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 1 ms
4,352 KB
testcase_20 AC 1 ms
4,348 KB
testcase_21 WA -
testcase_22 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    int d;
    
    cin >> d;
    
    if (d < 10) {
        cout << d << endl;
    } else {
        if (d % 2 == 0) {
            d -= 9;
            d = d / 20 + 1;
        } else {
            d -= 10;
            d = (d % 20) / 2;
        }
    }
    
    cout << d << endl;
    
    return 0;
}
0