# それは満足できる数字ですか？

このチャットの会話
に触発された

• `x` is the longest trailing repeating suffix, or the
last digit if there is no repetition at the end
(`123333` -> `3333`, `545656`
-> `5656`, `123` ->
`3`)
• `b` is the single digit prior to `x`
(`123333` -> `2`, `55545656`
-> `4`)
• `a` is the remaining prefix (`123333`
-> `1`, `55545656` ->
`555`)
• `a == c**b` (`**` denotes exponentation),
where `c` is the number of repetitions of the smallest
repeating portion of `x` (`1623333` ->
`4` (`3 3 3 3`, not `33 33`))

たとえば、 `a = 8``b = 3````c = 2````8300` `x = 00` `x = 1`
`b = 5``a = 246``24651`
`c ^ 5 = 246` を満たす整数 `c` ではありません。 ```x = 222````b = 1` では `a` の数字は残っていないので、
`1222` /code>

Given a positive integer `n >= 100`, output
whether or not `n` is a satisfying number.

## 例

``````8300: True (a=8, b=3, c=2, x=00)
24651: False
1222: False
92555: True (a=9, b=2, c=3, x=555)
64633: True (a=64, b=6, c=2, x=33)
512944: True (a=512, b=9, c=2, x=44)
123: True (a=1, b=2, c=1, x=3)
822809: False
376664: False
723799: False
1234: False
34330000000: True (a=343, b=3, c=7, x=0000000)
92313131: True (a=9, b=2, c=3, x=313131)
16424442444: True (a=16, b=4, c=2, x=24442444)
``````
ベストアンサー

# Jelly, 26 bytes

が長すぎると感じる

``````DŒṖṖEÐƤḄ\$ÐṀLÐṂṪµḢ*@0¦LµṪ⁼Ḍ
``````

を返すモナドリンクです。

Try it
online!
or see a test-suite

### どうやって？

``````DŒṖṖEÐƤḄ\$ÐṀLÐṂṪµḢ*@0¦LµṪ⁼Ḍ - Link: integer, n    e.g. 8300
D                          - to decimal list          [8,3,0,0]
ŒṖ                        - all partitions           [[[8],[3],[0],[0]],[[8],[3],[0,0]],[[8],[3,0],[0]],[[8],[3,0,0]],[[8,3],[0],[0]],[[8,3],[0,0]],[[8,3,0],[0]],[[8,3,0,0]]]
Ṗ                       - pop (the "no tail" one)  [[[8],[3],[0],[0]],[[8],[3],[0,0]],[[8],[3,0],[0]],[[8],[3,0,0]],[[8,3],[0],[0]],[[8,3],[0,0]],[[8,3,0],[0]]]
ÐṀ                - keep maximal under the operation: e.g. for [[8,3],[0],[0]]
ÐƤ                    -     for suffixes:   i.e. [[[8,3],[0],[0]],[[0],[0]],[[0]]]
E                      -       all equal?         [0              ,1        ,1]
Ḅ                   -     convert from binary  3
-          ...which yields [[[8],[3],[0],[0]],[[8,3],[0],[0]]]
ÐṂ             - keep minimal under the operation:
L               -   length
-          ...which yields [[[8,3],[0],[0]]]
Ṫ            - tail (rightmost)         [[8,3],[0],[0]]