結果

問題 No.1663 Maximum Remainder
ユーザー hir355hir355
提出日時 2021-09-03 21:21:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 82,468 KB
実行使用メモリ 59,200 KB
最終ジャッジ日時 2024-05-09 01:17:44
合計ジャッジ時間 1,578 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
58,376 KB
testcase_01 AC 46 ms
58,856 KB
testcase_02 AC 37 ms
52,084 KB
testcase_03 AC 36 ms
52,756 KB
testcase_04 AC 36 ms
52,892 KB
testcase_05 AC 42 ms
59,068 KB
testcase_06 AC 43 ms
59,032 KB
testcase_07 AC 40 ms
58,976 KB
testcase_08 AC 40 ms
59,200 KB
testcase_09 AC 40 ms
57,580 KB
testcase_10 AC 41 ms
58,920 KB
testcase_11 AC 38 ms
53,260 KB
testcase_12 AC 41 ms
57,584 KB
testcase_13 AC 38 ms
52,248 KB
testcase_14 AC 37 ms
52,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c, d, m = map(int, input().split())
ans = 0
for i in range(a, b + 1):
    for j in range(c, d + 1):
        res = (i + j) % m
        if ans < res:
            ans = res
print(ans)
0