結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-11 19:22:50 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 2,000 ms |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 18,944 KB |
| 最終ジャッジ日時 | 2026-05-02 09:49:41 |
| 合計ジャッジ時間 | 2,974 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
def f(xs)
res=[]
e=xs.shift
while xs.empty? == false
e2=e+xs[0]
e2=e2%10+1 if(e2>=10)
res<<e2
e=xs.shift
end
return res
end
gets.to_i.times{
xs=gets.chomp.split("").map{|e| e.to_i}
while xs.size>1
xs=f(xs)
end
p xs[0]
}
horiesiniti