結果

問題 No.1663 Maximum Remainder
ユーザー ryusukeryusuke
提出日時 2021-10-05 14:27:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 156 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 76,496 KB
最終ジャッジ日時 2023-09-30 08:30:53
合計ジャッジ時間 2,661 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
76,252 KB
testcase_01 AC 86 ms
76,424 KB
testcase_02 AC 77 ms
71,240 KB
testcase_03 AC 79 ms
71,464 KB
testcase_04 AC 78 ms
71,300 KB
testcase_05 AC 82 ms
76,496 KB
testcase_06 AC 81 ms
75,856 KB
testcase_07 AC 80 ms
75,804 KB
testcase_08 AC 80 ms
75,784 KB
testcase_09 AC 78 ms
75,832 KB
testcase_10 AC 79 ms
75,776 KB
testcase_11 AC 75 ms
71,260 KB
testcase_12 AC 79 ms
75,660 KB
testcase_13 AC 75 ms
71,244 KB
testcase_14 AC 76 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c, d, mod = map(int,input().split())
ans = -1
for i in range(a, b + 1):
    for j in range(c, d + 1):
        ans = max(ans, (i + j) % mod)
print(ans)
0