結果
| 問題 |
No.2401 Dirty Shoes and Stairs
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2023-08-11 03:29:30 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 208 ms / 2,000 ms |
| コード長 | 184 bytes |
| コンパイル時間 | 301 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 31,104 KB |
| 最終ジャッジ日時 | 2024-11-17 16:02:54 |
| 合計ジャッジ時間 | 4,943 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
f=[1]*(gets.to_i+1)
s=0
n=gets.to_i
xs=gets.split(" ").map{|e| e.to_i}
xs.each{|x|
f[s]=0
s+=x
}
n=gets.to_i
xs=gets.split(" ").map{|e| e.to_i}
xs.each{|x|
f[s]=0
s-=x
}
puts f.sum
horiesiniti