結果

問題 No.1663 Maximum Remainder
ユーザー 👑 horiesinitihoriesiniti
提出日時 2022-12-27 20:43:17
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 11,312 KB
実行使用メモリ 15,312 KB
最終ジャッジ日時 2023-08-14 10:58:36
合計ジャッジ時間 4,154 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,048 KB
testcase_01 AC 106 ms
15,128 KB
testcase_02 AC 82 ms
15,184 KB
testcase_03 AC 81 ms
15,204 KB
testcase_04 AC 81 ms
15,080 KB
testcase_05 AC 81 ms
15,024 KB
testcase_06 AC 82 ms
15,056 KB
testcase_07 WA -
testcase_08 AC 79 ms
15,112 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 80 ms
15,032 KB
testcase_14 AC 81 ms
15,064 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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|
		d=(n1+n2)%m
		ans=d if ans<d
	}
}
puts ans
0