結果

問題 No.1663 Maximum Remainder
ユーザー shobonvipshobonvip
提出日時 2023-02-17 19:51:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 134 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 76,244 KB
最終ジャッジ日時 2023-09-26 17:17:44
合計ジャッジ時間 3,001 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
76,028 KB
testcase_01 AC 82 ms
76,100 KB
testcase_02 AC 74 ms
71,152 KB
testcase_03 AC 72 ms
71,100 KB
testcase_04 AC 73 ms
71,144 KB
testcase_05 AC 79 ms
76,244 KB
testcase_06 AC 76 ms
75,760 KB
testcase_07 AC 75 ms
75,688 KB
testcase_08 AC 77 ms
75,900 KB
testcase_09 AC 76 ms
75,736 KB
testcase_10 AC 77 ms
75,840 KB
testcase_11 AC 73 ms
71,316 KB
testcase_12 AC 77 ms
75,700 KB
testcase_13 AC 73 ms
71,028 KB
testcase_14 AC 73 ms
71,304 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):
		ans = max(ans, (i+j) % m)

print(ans)
0