結果

問題 No.338 アンケート機能
ユーザー wotsushiwotsushi
提出日時 2017-01-28 10:03:45
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 66,184 KB
最終ジャッジ日時 2023-08-25 13:00:11
合計ジャッジ時間 14,867 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 408 ms
66,184 KB
testcase_01 AC 426 ms
66,072 KB
testcase_02 AC 427 ms
66,040 KB
testcase_03 AC 420 ms
66,104 KB
testcase_04 WA -
testcase_05 AC 438 ms
66,088 KB
testcase_06 WA -
testcase_07 AC 381 ms
65,992 KB
testcase_08 AC 432 ms
66,152 KB
testcase_09 AC 387 ms
66,016 KB
testcase_10 AC 390 ms
66,124 KB
testcase_11 AC 433 ms
65,996 KB
testcase_12 AC 386 ms
65,992 KB
testcase_13 AC 425 ms
65,856 KB
testcase_14 AC 394 ms
66,176 KB
testcase_15 AC 392 ms
66,092 KB
testcase_16 AC 434 ms
65,944 KB
testcase_17 AC 396 ms
65,896 KB
testcase_18 AC 434 ms
66,136 KB
testcase_19 AC 397 ms
65,952 KB
testcase_20 AC 391 ms
65,928 KB
testcase_21 AC 421 ms
65,948 KB
testcase_22 AC 420 ms
65,956 KB
testcase_23 AC 424 ms
66,100 KB
testcase_24 AC 411 ms
65,952 KB
testcase_25 AC 391 ms
66,084 KB
testcase_26 AC 436 ms
66,008 KB
testcase_27 AC 421 ms
65,840 KB
testcase_28 AC 424 ms
65,896 KB
testcase_29 AC 428 ms
65,956 KB
testcase_30 AC 401 ms
65,936 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

A, B = gets.split.map(&:to_i)
ans = [*(1..1000)].product([*(1..1000)]).select {|a, b|
  (a + b) * (2 * A - 1) <= 200 * a and 200 * a < (a + b) * (2 * A + 1) and
  (a + b) * (2 * B - 1) <= 200 * b and 200 * b < (a + b) * (2 * B + 1)}.map {|(a, b)| a + b}.min
puts ans
0