seven is zero

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

take the sum of the given numbers from left to right. if at any intermediate point the partial sum is exactly seven, set it to zero.

Options

exec is denied

rejudge feature is enabled

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

Sample input:_

1 3 0 2 0 0 1 3 1 3
0 2 3 0 1 0 1 1 0 0
3 3 0 2 3 3 1 3 2 0
1 2 3 2 2 0 2 1 3 2
0 0 2 3 1 3 2 3 2 2
1 0 3 2 1 1 0 1 3 1
0 0 3 3 2 2 1 2 2 2
1 2 1 3 1 3 3 3 2 1
3 2 0 3 2 2 3 2 0 3
3 3 2 2 1 2 0 3 2 1
1 0 3 2 3 3 0 3 1 3
2 0 0 0 3 3 1 1 2 2
3 2 0 2 3 1 3 1 1 3
1 1 2 1 1 1 0 1 3 2
3 0 1 0 1 2 2 0 3 3
2 2 0 3 0 3 3 3 0 1
3 2 3 3 1 3 0 2 1 0
2 1 1 0 1 2 2 0 2 0
1 0 1 1 2 2 2 0 2 3
3 1 0 0 3 3 1 0 3 0
2 0 1 0 1 1 1 3 0 0
2 1 1 1 2 0 0 0 0 0
3 3 0 2 2 3 2 2 3 0
2 2 3 1 1 0 3 3 3 3
3 0 2 3 0 0 3 0 2 1
1 1 0 1 3 3 1 1 2 0
2 1 0 2 3 3 3 2 2 3
3 3 3 2 1 3 1 3 2 1
0 1 3 2 3 1 0 3 2 3
2 2 1 3 1 2 2 0 2 2
0 0 0 0 2 1 3 1 3 1
0 1 3 3 0 0 0 0 0 0
0 1 0 0 0 1 1 2 0 3
3 2 2 0 0 2 2 3 1 3
1 0 3 3 1 3 2 3 3 1
3 2 2 1 3 0 3 3 1 2
2 0 0 1 1 1 3 2 2 1
1 2 3 0 0 2 3 0 1 3
3 1 2 3 1 0 1 0 1 2
0 1 1 3 1 1 2 3 3 0
2 2 0 3 0 1 0 1 3 0
2 1 1 1 2 1 3 2 0 0
3 2 1 2 1 2 3 0 2 1
2 1 0 3 2 1 3 3 3 0
1 1 1 2 2 0 0 3 2 0
0 1 2 3 0 2 2 0 3 2
3 3 1 1 3 1 0 1 3 1
0 1 3 1 0 3 2 1 3 3
3 2 3 3 0 3 2 1 3 1
3 0 0 0 2 1 3 1 2 0

Sample output:

0
1
20
18
18
6
17
6
20
19
19
14
5
6
8
10
18
4
0
0
9
0
20
14
14
13
21
22
18
17
4
0
8
4
13
6
13
15
14
8
5
6
17
18
5
15
10
17
21
12

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1rotary-o420.03432024/08/25 22:29:530B / 25B / 14B
2╾━╤デ╦︻(˙ ͜ʟ˙) 007570.01932024/08/23 19:08:440B / ?B / ?B

Ruby2 _

RankUserSizeTimeDateStatistics
1rotary-o410.05992024/08/25 09:34:020B / 16B / 24B
2Sisyphus460.08172024/08/24 11:27:390B / 27B / 18B

Perl _

RankUserSizeTimeDateStatistics
1tails340.01532024/08/23 15:26:470B / 11B / 20B
2fuzzylojik410.01512024/09/04 05:22:490B / 18B / 21B
3Sisyphus (tails)330.02032024/09/06 14:07:220B / 13B / 17B

Python3 _

RankUserSizeTimeDateStatistics
1Sisyphus580.05402024/08/25 14:32:020B / 32B / 25B
2xnor600.05012024/08/23 16:11:150B / 36B / 13B
3fuzzylojik600.04872024/09/04 04:59:540B / 36B / 14B
4cef620.05042024/08/23 16:51:080B / 35B / 17B
5fuzzylojik(alt)620.06442024/09/04 22:34:080B / 36B / 26B

JavaScript _

RankUserSizeTimeDateStatistics
1fuzzylojik540.02262024/09/04 04:58:430B / 33B / 19B
2Sisyphus560.02152024/08/26 08:37:250B / 36B / 17B
3sean570.02242024/08/26 04:29:200B / 33B / 22B
4Steffan570.02422024/09/04 03:39:170B / 33B / 22B
5ovs590.02172024/08/23 18:24:550B / 32B / 27B
6KrausRaus590.02352024/08/23 20:36:010B / 34B / 23B
7sean (alt)590.02122024/08/26 04:35:520B / 32B / 27B
8sean (alt2)590.02162024/08/26 04:36:470B / 36B / 20B

Perl6 _

RankUserSizeTimeDateStatistics
1Fleur510.54582024/09/06 10:00:420B / 21B / 26B

K _

RankUserSizeTimeDateStatistics
1tubular230.00932024/08/23 12:10:010B / 6B / 17B
2ovs260.00872024/08/23 18:42:540B / 8B / 17B

Atlas _

RankUserSizeTimeDateStatistics
1tails140.33192024/08/23 17:12:520B / 2B / 12B

C _

RankUserSizeTimeDateStatistics
1nai670.01422024/09/06 00:49:270B / 34B / 33B
2rotary-o680.01432024/08/24 09:55:540B / 33B / 35B
3tails680.01402024/08/24 22:57:330B / 34B / 34B
4%20680.01562024/09/06 05:52:090B / 35B / 33B
5chocobi700.01422024/08/23 21:23:320B / 36B / 34B

Haskell _

RankUserSizeTimeDateStatistics
1xnor670.01872024/08/23 16:42:400B / 40B / 22B
2lynn(alt)670.01792024/08/23 23:11:360B / 42B / 21B
3xnor (alt)670.02002024/08/24 06:21:540B / 41B / 22B
4hikari_no_yume670.02482024/08/25 20:11:190B / ?B / ?B
5lynn680.02082024/08/23 21:40:560B / 40B / 27B
6lynn(alt2)680.01782024/08/23 23:13:000B / 42B / 26B

Java _

RankUserSizeTimeDateStatistics
1rotary-o1250.06172024/08/24 13:44:200B / 76B / 45B

C# _

RankUserSizeTimeDateStatistics
1rotary-o1270.04452024/08/24 13:44:320B / 82B / 40B

AWK _

RankUserSizeTimeDateStatistics
1Fleur340.01862024/08/26 10:31:330B / 13B / 21B
2McBusLuck380.01402024/08/26 03:53:570B / 17B / 21B

sed _

RankUserSizeTimeDateStatistics
1tails980.02652024/09/05 17:24:330B / 35B / 51B
2McBusLuck1050.02872024/08/25 20:11:270B / 40B / 53B
3Sisyphus1060.02252024/08/26 12:33:170B / 41B / 53B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails450.02672024/08/23 17:44:160B / 16B / 24B
2McBusLuck540.06412024/08/26 22:52:210B / 22B / 26B

dc _

RankUserSizeTimeDateStatistics
1tails350.01792024/08/27 15:13:490B / 23B / 12B
2i336_930.01762024/09/05 13:17:400B / 66B / 26B
3Fleur9990.01572024/08/27 09:41:210B / ?B / ?B
4Fleur330.02252024/09/06 10:07:300B / 17B / 16B

xgawk _

RankUserSizeTimeDateStatistics
1McBusLuck380.01462024/08/26 03:39:550B / 17B / 21B

Whitespace _

RankUserSizeTimeDateStatistics
1%201040.02352024/09/05 08:26:570B / 0B / 0B
2rotary-o1040.02262024/09/05 22:44:010B / 0B / 0B

GolfScript _

RankUserSizeTimeDateStatistics
1tails170.07072024/08/23 18:11:210B / 3B / 14B
2orthoplex170.04432024/08/23 20:02:340B / 3B / 14B
3lynn190.04792024/08/23 21:56:100B / 5B / 14B

gs2 _

RankUserSizeTimeDateStatistics
1tails90.07972024/08/23 15:28:212B / 6B / 1B
2whio90.10622024/08/24 06:22:482B / 6B / 1B

Nibbles _

RankUserSizeTimeDateStatistics
1tails70.02162024/08/23 16:01:225B / 1B / 1B
2whio90.02442024/09/04 11:03:236B / 2B / 1B

Lazy-K _

RankUserSizeTimeDateStatistics
1tails7230.25902024/08/24 23:08:490B / 389B / 334B

Universal Lambda _

RankUserSizeTimeDateStatistics
1tails650.10652024/08/24 23:40:3546B / 13B / 4B

z80 _

RankUserSizeTimeDateStatistics
1%20430.06022024/09/06 05:09:5828B / 9B / 4B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o622.85062024/08/24 11:54:250B / 34B / 28B

Language Ranking_

RankLangUserSizeScore
1Nibblestails710000
2gs2tails97777
3Atlastails145000
4GolfScripttails174117
5Ktubular233043
6dcFleur332121
7PerlSisyphus (tails)332121
8AWKFleur342058
9xgawkMcBusLuck381842
10Ruby2rotary-o411707
11Rubyrotary-o421666
12z80%20431627
13Bash (builtins)tails451555
14Perl6Fleur511372
15JavaScriptfuzzylojik541296
16Python3Sisyphus581206
17Scalarotary-o621129
18Universal Lambdatails651076
19Haskellxnor671044
20Cnai671044
21sedtails98714
22Whitespace%20104673
23Javarotary-o125560
24C#rotary-o127551
25Lazy-Ktails72396

return to the top page