結果

問題 No.2194 兄弟の掛け引き
ユーザー simansiman
提出日時 2023-01-20 21:45:59
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 150 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 17,048 KB
最終ジャッジ日時 2023-09-05 14:00:23
合計ジャッジ時間 2,644 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 97 ms
16,932 KB
testcase_02 AC 97 ms
16,836 KB
testcase_03 AC 97 ms
16,968 KB
testcase_04 AC 98 ms
16,808 KB
testcase_05 AC 97 ms
16,772 KB
testcase_06 AC 97 ms
16,904 KB
testcase_07 AC 97 ms
16,848 KB
testcase_08 AC 96 ms
16,976 KB
testcase_09 AC 96 ms
16,768 KB
testcase_10 AC 96 ms
16,760 KB
testcase_11 AC 95 ms
16,808 KB
testcase_12 AC 96 ms
16,880 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 97 ms
16,984 KB
testcase_16 AC 98 ms
17,048 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