結果

問題 No.894 二種類のバス
ユーザー wipexwipex
提出日時 2019-10-08 22:35:22
言語 Ruby
(3.2.2)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 86 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 11,344 KB
実行使用メモリ 15,312 KB
最終ジャッジ日時 2023-08-07 15:23:14
合計ジャッジ時間 3,376 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,108 KB
testcase_01 AC 76 ms
15,092 KB
testcase_02 AC 76 ms
15,232 KB
testcase_03 AC 77 ms
15,100 KB
testcase_04 AC 77 ms
15,068 KB
testcase_05 AC 77 ms
15,148 KB
testcase_06 AC 76 ms
15,064 KB
testcase_07 AC 76 ms
15,100 KB
testcase_08 AC 78 ms
15,124 KB
testcase_09 AC 76 ms
15,304 KB
testcase_10 AC 77 ms
15,156 KB
testcase_11 AC 76 ms
15,124 KB
testcase_12 AC 76 ms
15,312 KB
testcase_13 AC 76 ms
15,100 KB
testcase_14 AC 78 ms
15,120 KB
testcase_15 AC 78 ms
15,252 KB
testcase_16 AC 77 ms
15,204 KB
testcase_17 AC 77 ms
15,116 KB
testcase_18 AC 76 ms
15,048 KB
testcase_19 AC 77 ms
15,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

t,a,b = gets.chomp.split(" ").map(&:to_i)
l = a.lcm(b)
p 1+(t-1)/a + (t-1)/b - (t-1)/l
0