結果

問題 No.46 はじめのn歩
ユーザー kawarayukawarayu
提出日時 2017-11-12 11:38:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2023-08-16 10:54:35
合計ジャッジ時間 978 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 15 ms
7,888 KB
testcase_04 AC 15 ms
7,776 KB
testcase_05 AC 15 ms
7,812 KB
testcase_06 AC 15 ms
7,784 KB
testcase_07 AC 14 ms
7,776 KB
testcase_08 AC 15 ms
7,872 KB
testcase_09 AC 15 ms
7,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def hajimeno(a, b):
    quotient, remainder = divmod(b, a)
    if quotient == 0:
        return 1
    elif remainder == 0:
        return quotient
    else:
        return quotient + 1

def main():
    a, b = map(int, input().strip().split())
    print(hajimeno(a, b))

if __name__ == '__main__':
    main()
0