結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-06-14 03:24:33 |
| 言語 | Ruby (4.0.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 48 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-10-09 13:32:12 |
| 合計ジャッジ時間 | 3,479 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n Syntax OK
ソースコード
k=0
n=STDIN.gets.to_i
a=STDIN.gets.split(" ")
b=STDIN.gets.split(" ")
a.zip(b) do |e1,e2|
if e2.to_i==0 then
k+=e1.to_i
else
k-=e1.to_i
end
end
if 0<=k then
puts "YES"
else
puts "NO"
end
horiesiniti