結果

問題 No.1663 Maximum Remainder
ユーザー Konton7
提出日時 2021-09-03 21:40:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 172 bytes
コンパイル時間 724 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-15 11:16:39
合計ジャッジ時間 1,404 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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