結果

問題 No.1663 Maximum Remainder
ユーザー 👑 horiesinitihoriesiniti
提出日時 2022-12-27 20:54:12
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 15,288 KB
最終ジャッジ日時 2023-08-14 11:09:29
合計ジャッジ時間 2,409 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
15,176 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 79 ms
15,012 KB
testcase_04 AC 78 ms
15,096 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b,c,d,m=gets.split(" ").map{|e| e.to_i}
ans=0
a.upto(b){|n1|
	c.upto(d){|n2|
		e=(n1+n2)%m
		if ans<e then
			p [n1,n2,e]
			ans=e
		end
	}
}
puts ans
0