to Radixal Integer FIXED

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

<b>I'm sorry for generating buggy test case for <a href='http://golf.shinh.org/p.rb?to+Radixal+Integer'>previous</a> problem; some outputs had leading 0s followed by other digit, which I did not intend; here is revised version.</b>

From <a href='http://golf.shinh.org/p.rb?to+Radixal+Integer'>original problem:</a>

<i>
Convert each string of digits to Radixal!!!! integer if convertable; to a question mark otherwise.

A valid Radixal!!!! integer shall have a pair of a value and a base;
you need to output the value in decimal to first column,
then base to second column, separating with a space.

<b>How to convert digits to Radixal!!!! integer (may contain my interpretation)</b>

<ol>
<li>0s only: value 0 with base 0</li>
<li>Consists of 1s only OR 1s and 0s only: not convertable</li>
<li>Otherwise, base: highest digit plus one; value: interpret as such base</li>
</ol)

--鳴神裁4.1号, 2021.08.19 22:47 UTC+9
</i>

FIXED by 鳴神裁4.1号, 2021.08.20, 08:06 UTC+9

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Sample output:

0 0
?
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
?
?
5 3
7 4
9 5
11 6
13 7
15 8
17 9
19 10

Sample input:_

01
23442
4557
9
133
80808
69000
50337
09114
6
20
85
17714
009
04
43799
90
3
4
02166
85829
0099
1
9
514
36
7
5
7917
015
35
2
9050
05140
24170
721
7611
86122
2
867
39847
8005
262
70487
4383
092
95399
7541
63283
56

Sample output:

?
1747 5
2415 8
9 10
31 4
53144 9
69000 10
20703 8
9114 10
6 7
6 3
77 9
8140 8
9 10
4 5
43799 10
90 10
3 4
4 5
783 7
85829 10
99 10
?
9 10
190 6
27 7
7 8
5 6
7917 10
11 6
23 6
2 3
9050 10
1140 6
10360 8
465 8
3977 8
56963 9
2 3
709 9
39847 10
5837 9
142 7
46330 9
3234 9
92 10
95399 10
3937 8
41790 9
41 7

Sample input:_

658
57
195
29
6
46775
5824
833
87
1567
0
8991
3
9473
734
6
68
70
0933
2
290
2122
60876
42672
59
5116
766
13
3162
5377
9
30048
510
28290
35979
457
2
510
87970
8
97
1
11889
47155
51
40
1
5019
0
721

Sample output:

539 9
47 8
195 10
29 10
6 7
19965 8
4315 9
678 9
79 9
887 8
0 0
8991 10
3 4
9473 10
476 8
6 7
62 9
56 8
933 10
2 3
290 10
71 3
40083 9
17850 8
59 10
1777 7
502 8
7 4
1122 7
2815 8
9 10
19727 9
186 6
28290 10
35979 10
303 8
2 3
186 6
87970 10
8 9
97 10
?
11889 10
20077 8
31 6
20 5
?
5019 10
0 0
465 8

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1Histocrat630.04702021/09/02 08:33:460B / 32B / 29B
2rotary-o630.04972021/09/02 23:22:210B / 29B / 31B

Ruby2 _

RankUserSizeTimeDateStatistics
1rotary-o620.16762021/09/03 21:45:020B / 30B / 30B
2Histocrat630.17872021/09/02 08:34:000B / 32B / 29B

Python _

RankUserSizeTimeDateStatistics
1hallvabo780.09052021/08/21 06:53:520B / 45B / 31B
2Dingledooper800.09192021/08/21 10:04:220B / 44B / 34B

Java _

RankUserSizeTimeDateStatistics
1rotary-o1890.18662021/09/04 10:35:410B / 107B / 76B

AWK _

RankUserSizeTimeDateStatistics
1鳴神裁4.1号1210.04162021/08/20 07:47:180B / 61B / 57B

Bash _

RankUserSizeTimeDateStatistics
1鳴神裁4.1号1070.02832021/08/25 16:41:400B / 43B / 58B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails950.17732021/08/24 16:21:220B / 28B / 52B
2McBusLuck1070.28222021/08/20 19:12:110B / 39B / 57B

gs2 _

RankUserSizeTimeDateStatistics
1tails190.23032021/08/24 17:36:094B / 6B / 9B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o1017.50552021/09/04 00:52:310B / 59B / 39B

Language Ranking_

RankLangUserSizeScore
1gs2tails1910000
2Ruby2rotary-o623064
3RubyHistocrat633015
4Pythonhallvabo782435
5Bash (builtins)tails952000
6Scalarotary-o1011881
7Bash鳴神裁4.1号1071775
8AWK鳴神裁4.1号1211570
9Javarotary-o1891005

return to the top page