ログインしてください。
提出 #24384055
ソースコード 拡げる
D = gets.to_i.digits(3) << 0
D.size.times{|i|
D[i+1] += 1 if 1 < D[i]
}
A = []
D.inject(1){|e,d|
A << [nil,e,-e][d]
next e*3
}
A.compact!
puts A.size,A*' '
提出情報
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 6 / 6 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, example0.txt, example1.txt, example2.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 60 ms | 14216 KiB |
| 001.txt | AC | 60 ms | 14100 KiB |
| 002.txt | AC | 62 ms | 14116 KiB |
| 003.txt | AC | 61 ms | 14232 KiB |
| 004.txt | AC | 60 ms | 14120 KiB |
| 005.txt | AC | 58 ms | 14040 KiB |
| 006.txt | AC | 62 ms | 14012 KiB |
| 007.txt | AC | 59 ms | 14088 KiB |
| 008.txt | AC | 63 ms | 14132 KiB |
| 009.txt | AC | 61 ms | 14000 KiB |
| 010.txt | AC | 59 ms | 14116 KiB |
| 011.txt | AC | 61 ms | 14060 KiB |
| 012.txt | AC | 60 ms | 14080 KiB |
| 013.txt | AC | 61 ms | 13992 KiB |
| 014.txt | AC | 62 ms | 14220 KiB |
| 015.txt | AC | 58 ms | 14152 KiB |
| 016.txt | AC | 59 ms | 14196 KiB |
| 017.txt | AC | 63 ms | 14100 KiB |
| 018.txt | AC | 63 ms | 14024 KiB |
| 019.txt | AC | 62 ms | 14120 KiB |
| 020.txt | AC | 57 ms | 14040 KiB |
| 021.txt | AC | 62 ms | 13984 KiB |
| 022.txt | AC | 62 ms | 14156 KiB |
| 023.txt | AC | 60 ms | 14128 KiB |
| 024.txt | AC | 61 ms | 14128 KiB |
| 025.txt | AC | 62 ms | 14068 KiB |
| 026.txt | AC | 62 ms | 14180 KiB |
| 027.txt | AC | 60 ms | 14148 KiB |
| example0.txt | AC | 63 ms | 14152 KiB |
| example1.txt | AC | 58 ms | 14248 KiB |
| example2.txt | AC | 59 ms | 14076 KiB |