結果
問題 |
No.338 アンケート機能
|
ユーザー |
|
提出日時 | 2016-01-29 23:36:03 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-09-21 18:46:43 |
合計ジャッジ時間 | 3,490 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 9 |
コンパイルメッセージ
Syntax OK
ソースコード
a, b = gets.split.map(&:to_i) ans = nil for x in 0..100 do for y in 0..100 do next if x == 0 && y == 0 t1 = ((100 * x).to_f / (x + y)).round t2 = ((100 * y).to_f / (x + y)).round next unless t1 == a next unless t2 == b ans = x + y if !ans || x + y < ans end end puts ans