do a bunch of stuff to a number

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

First, run the number through the Collatz conjecture. Keep count of how many steps it takes for the number to reach 1.

Second, convert the number of steps to binary.

Third, invert the binary, e.g. 101 becomes 010.

Fourth, convert the inverted binary back to a decimal and print it.

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

65
2
16
76
12
38
14
88
30
39

Sample output:

4
0
3
9
6
10
14
14
13
29

Sample input:_

84
38
32
83
96
70
43
72
77
51

Sample output:

6
10
2
17
3
1
2
9
9
7

Sample input:_

45
66
60
18
15
40
5
25
90
8

Sample output:

15
4
12
11
14
7
2
8
14
0

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1rotary-o540.05012021/10/10 21:59:4825B / 14B / 9B
2Sisyphus610.05022021/10/08 12:36:250B / 46B / 12B
3Dingledooper ()610.04992021/10/08 13:30:0325B / 19B / 11B

Ruby2 _

RankUserSizeTimeDateStatistics
1rotary-o610.16952021/10/10 22:00:2325B / 17B / 13B

Perl _

RankUserSizeTimeDateStatistics
1tails640.05762021/09/30 13:14:370B / 24B / 40B

Python _

RankUserSizeTimeDateStatistics
1Dingledooper720.09172021/10/01 09:37:130B / 40B / 24B
2Sisyphus720.08862021/10/01 10:08:550B / 54B / 15B
3Dingledooper ()720.08952021/10/01 11:42:160B / 54B / 15B
4xnor720.14562021/10/12 18:17:530B / 40B / 24B
5Erik the Outgolfer750.09052021/10/01 08:33:500B / 40B / 27B

JavaScript _

RankUserSizeTimeDateStatistics
1Dingledooper650.08192021/10/01 13:50:520B / 37B / 28B
2emplv650.05982021/10/03 08:24:490B / 37B / 28B
3Irratix680.05832021/10/03 10:12:060B / 38B / 30B
4panorrrama990.06842021/10/14 06:53:060B / 51B / 46B
5KrausRaus1170.05902021/10/01 10:42:020B / 65B / 51B

Jelly _

RankUserSizeTimeDateStatistics
1hako180.48452021/10/06 19:34:4710B / 5B / 3B

C _

RankUserSizeTimeDateStatistics
1tails880.04042021/10/01 10:46:540B / 43B / 45B

Haskell _

RankUserSizeTimeDateStatistics
1lynn890.05222021/10/01 00:31:130B / 52B / 30B
2rak15071000.05142021/10/01 20:30:500B / 57B / 31B

Java _

RankUserSizeTimeDateStatistics
1rotary-o1460.16142021/10/11 20:53:4618B / 74B / 48B

AWK _

RankUserSizeTimeDateStatistics
1Fleur540.04142021/10/04 11:26:220B / 25B / 29B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails710.45732021/09/30 15:48:510B / 29B / 33B
2McBusLuck900.09942021/09/30 16:02:300B / 35B / 48B

gs2 _

RankUserSizeTimeDateStatistics
1tails210.48202021/09/30 12:57:007B / 10B / 4B

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik550.07412021/10/07 03:50:290B / 30B / 25B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o7510.08272021/10/11 20:46:0518B / 28B / 26B

Language Ranking_

RankLangUserSizeScore
1Jellyhako1810000
2gs2tails218571
3AWKFleur543333
4Rubyrotary-o543333
5BurlesqueHendrik553272
6Ruby2rotary-o612950
7Perltails642812
8JavaScriptDingledooper652769
9Bash (builtins)tails712535
10PythonDingledooper722500
11Scalarotary-o752400
12Ctails882045
13Haskelllynn892022
14Javarotary-o1461232

return to the top page