結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-10-16 22:22:06 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 196 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-05-16 14:30:51 |
| 合計ジャッジ時間 | 3,769 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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