結果

問題 No.1486 ロボット
ユーザー yuruhiyayuruhiya
提出日時 2021-04-23 22:33:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 203 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2023-09-17 12:39:22
合計ジャッジ時間 3,376 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,104 KB
testcase_01 AC 85 ms
15,360 KB
testcase_02 AC 84 ms
15,244 KB
testcase_03 AC 87 ms
15,076 KB
testcase_04 AC 82 ms
15,160 KB
testcase_05 AC 85 ms
15,056 KB
testcase_06 AC 203 ms
15,032 KB
testcase_07 AC 202 ms
15,164 KB
testcase_08 AC 142 ms
15,264 KB
testcase_09 AC 82 ms
15,156 KB
testcase_10 AC 90 ms
15,292 KB
testcase_11 AC 90 ms
15,092 KB
testcase_12 AC 82 ms
15,056 KB
testcase_13 AC 83 ms
15,212 KB
testcase_14 AC 141 ms
15,088 KB
testcase_15 AC 92 ms
15,104 KB
testcase_16 AC 106 ms
15,112 KB
testcase_17 AC 108 ms
15,156 KB
testcase_18 AC 98 ms
15,156 KB
testcase_19 AC 89 ms
15,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b, c, d, e = gets.split.map &:to_i
l = (a + b).lcm(c + d)
x, y = [0...l, 0...e % l].map {
	_1.count { |x| x % (a + b) < a && x % (c + d) < c }
}
puts x * (e / l) + y
0