結果

問題 No.1663 Maximum Remainder
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2022-07-02 16:59:54
言語 Ruby
(3.4.1)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 138 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-11-27 11:58:02
合計ジャッジ時間 2,683 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b, c, d, m = gets.split(" ").map(&:to_i)

ans = 0
for x in a..b do
	for y in c..d do
		ans = [ans, (x + y) % m].max
	end
end

puts ans
0