結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2015-10-11 19:08:44 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-07-21 06:28:30 |
合計ジャッジ時間 | 3,140 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 8 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i a = gets.chomp.split(" ").map(&:to_i) b = gets.chomp.split(" ").map(&:to_i) score = 0 sum = 0 a.each{|x| sum += x } b.each_index{|i| if b[i] == 0 score += a[i] end } if sum - score <= score puts "YES" else puts "NO" end