結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-06-14 03:24:33 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 14,848 KB |
| 最終ジャッジ日時 | 2026-04-25 16:50:39 |
| 合計ジャッジ時間 | 2,799 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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