結果

問題 No.1663 Maximum Remainder
ユーザー えいじえいじ
提出日時 2023-10-05 21:58:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 246 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 39,412 KB
最終ジャッジ日時 2023-10-05 21:58:41
合計ジャッジ時間 2,527 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 206 ms
16,088 KB
testcase_01 AC 246 ms
39,412 KB
testcase_02 AC 16 ms
7,812 KB
testcase_03 AC 16 ms
7,808 KB
testcase_04 AC 16 ms
7,828 KB
testcase_05 AC 26 ms
9,348 KB
testcase_06 AC 20 ms
8,252 KB
testcase_07 AC 24 ms
8,984 KB
testcase_08 AC 17 ms
8,352 KB
testcase_09 AC 17 ms
8,264 KB
testcase_10 AC 17 ms
7,968 KB
testcase_11 AC 16 ms
7,816 KB
testcase_12 AC 17 ms
8,356 KB
testcase_13 AC 16 ms
7,984 KB
testcase_14 AC 16 ms
7,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c, d, m = [int(x) for x in input().split()]
ans = []
for i in range(a, b + 1):
    for j in range(c, d + 1):
        ans.append((i + j) % m)
print(max(ans))
0