結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-10-16 22:22:06 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 7,168 KB |
| 実行使用メモリ | 12,544 KB |
| 最終ジャッジ日時 | 2024-11-22 12:37:06 |
| 合計ジャッジ時間 | 5,166 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 4 WA * 18 |
コンパイルメッセージ
Main.rb:7: warning: assigned but unused variable - n Syntax OK
ソースコード
def f(line)
arr = line.split("").map(&:to_i)
arr = (0..(arr.size - 2)).each_with_object([]){|i, temp| temp << (arr[i] + arr[i + 1]).divmod(10).reduce(&:+)} while arr.size > 1
arr.first
end
n = STDIN.gets
puts STDIN.map(&method(:f))
neko_the_shadow