結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-16 22:59:34 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 336 bytes |
| コンパイル時間 | 125 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 108,424 KB |
| 最終ジャッジ日時 | 2024-07-02 20:46:28 |
| 合計ジャッジ時間 | 8,115 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 TLE * 1 -- * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.chomp.to_i
p = gets.chomp.split(" ").map(&:to_i)
s = p.inject(:*)
f = 1
def moji(s)
zzz = s.to_s
sl = s.to_s.length
return zzz, sl
end
zzz, sl = moji(s)
while(f)
if sl > 1
yyy = 0
for i in 0...sl
yyy +=zzz[i].to_i
end
zzz, sl= moji(yyy)
else
yyy = zzz[0]
f = nil
end
end
p yyy.to_i