結果

問題 No.46 はじめのn歩
ユーザー ロク@マジミラ2023(幕張)9/1~9/3参加ロク@マジミラ2023(幕張)9/1~9/3参加
提出日時 2023-08-02 02:35:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 1,476 ms
コンパイル使用メモリ 163,336 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 02:57:34
合計ジャッジ時間 2,147 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
6,940 KB
testcase_02 WA -
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 WA -
testcase_07 AC 2 ms
6,944 KB
testcase_08 WA -
testcase_09 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int ctoi(char &c){
    switch(c){
        case '1': return 1;
        case '2': return 2;
        case '3': return 3;
        case '4': return 4;
        case '5': return 5;
        case '6': return 6;
        case '7': return 7;
        case '8': return 8;
        case '9': return 9;
        default: return 0;
    }
}

int main() {
    int a, b;
    cin >> a >> b;

    if(a % 2 != 0 || b % 2 != 0){
        cout << (b / a) + 1 << endl;
    } else {
        cout << b / a << endl;
    }
}
0