結果

問題 No.2194 兄弟の掛け引き
ユーザー simansiman
提出日時 2023-01-20 21:44:54
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 17,156 KB
最終ジャッジ日時 2023-09-05 13:59:09
合計ジャッジ時間 3,431 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
16,844 KB
testcase_01 AC 94 ms
16,760 KB
testcase_02 AC 94 ms
16,764 KB
testcase_03 AC 94 ms
16,764 KB
testcase_04 AC 94 ms
16,760 KB
testcase_05 AC 96 ms
16,768 KB
testcase_06 AC 95 ms
17,080 KB
testcase_07 AC 96 ms
16,804 KB
testcase_08 AC 94 ms
16,828 KB
testcase_09 AC 98 ms
16,904 KB
testcase_10 AC 98 ms
16,868 KB
testcase_11 AC 97 ms
16,848 KB
testcase_12 AC 96 ms
17,012 KB
testcase_13 AC 98 ms
16,960 KB
testcase_14 WA -
testcase_15 AC 94 ms
17,040 KB
testcase_16 AC 93 ms
16,796 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

A, B, C = gets.split.map(&:to_i)

res = [*1..100_000].select { |n| v = n * A; v -= B if v > B; v == C }

if res.empty?
  puts -1
else
  puts res
end
0