Count Carries

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

Count the number of carries in decimal addition.

-- mitchs

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

123456789 987654321
987654321 123456789
123456789 876543210
876543210 123456789
123456789 876543211
876543211 123456789
1 999999999
999999999 1
126 266992370
799 1
332050150 78958551
945271 222222222
89 533543
226 7
273 9173384
99999 1000
955277625 11111111
10 49999999
14 3541
1 1662
8150 5000000
225044844 768
229552187 454
33 2
5 88888
6075879 207445665
16685 41300
613567148 2206365
6350 111322733
1 19999999
444 390092258
249799822 927624484
27167 75647454
706197 59843446
443026197 55608
11 31573
393727936 415851344
679233 713207700
386 137228062
259342720 918
74946 7910
69 692261911
902398571 23786084
302142047 66
218493568 870
78286 611
24 79218
8000 568309469
80000 6070
64897632 274211110
676750422 91657182
9999 10
957890599 42717432
72 2614189
327172877 40525
902763617 973072287
5472683 721776
2360219 880434678
1144521 877
39437250 944
91 8
10000 99999
429521978 2593536
22686 542852810
245939801 66343063
5445323 32088
408957156 921329
660108011 9
8119493 224990796
770130 74132756
254774214 939652
8397491 194999668
350 998289164
999 1
64867086 300000000
25787549 376
7591991 801160856
77777777 333333
39999999 100000
4 9032047
6579 3711
3 241
211027745 846372599
9 914984114
63249 23057
688782835 68
559206430 148738725
4 80885210
237385048 338
70809 515887803
6357 43
222 9074540
314870240 150
103176711 475
67852306 431090
684921 12410
370052 263385942
99999999 666666666
366057275 1512981
227249242 918098144
10000 99999999
666 7978067
548 152877
9 8113720
856928541 66
65797345 8739
55 2200
58136899 20000
75741637 862812
2351 10
972 744516
51319 1
90781427 40
1000000 299999999
777777 203706
7 379002998
556458708 114686459
455673 491535
200 387
199999999 10000
225912457 973338829
145868993 685859498
279 67450
52 663
5858826 738150987
822350 700167070
14924 748450961
7 82526441
7851937 3
38 53
99999999 100000
66666666 4169
10000000 99999999
811116106 86
20449 588957550
943531 941038936
16124 747
999999 10
261443159 244347545
834688108 102
93990 804
224275999 715
10 9999999
60 10577
9999999 100000
725412 30719287
599999999 10000
45 19590
78781 900197333
300000 578673
1 29999999
593 80087138
90070944 51884244
1 6999999
125 6
14912697 457609128
97 941725469
8670980 205024078
65 355669051
222222222 56540315
2295 217110617
5701 929632
1388 69
3333 20819921
873230101 2670143
222704 931872306
898262161 284345
70483474 32708658
788 59159261
279005211 79356311
5349 22798
531556504 21
99999999 11361825
34994 31409
224989567 644791600
312 837
99999 10000
89657 970
5864952 29
7511 357677002
925187898 6607265
875789043 333
222 88524
9104 931445886
91221313 760038998
69 10
722 2222222
80000000 45
24618289 7
544101428 1
3 5217806
211 730177
500 6272617
10 19
10000 499999999
790084588 189332788
638503453 6280235
784978052 500000
887 27494670
58623963 760450377
34226 6613359
249045165 3986043
412 53235946
727 189
21280520 693956289
3681116 553498648
127 6594
99999999 10000000
2 736
778 986
784911274 7788278
17656083 2
2 507049303
777777777 8
8074392 9
96 6261
114577 7
443533313 959231039
1 7999
8030259 8
7952827 2507823
3231 784
134645873 55555
9343 508
4 99
10 39
88066029 11867293
43 55555
409715 760371560
706743781 18
612432 3841129
41 5555555
555234920 89123
180 359050941
792154309 798765571
1762623 4978
99999999 1000
406174406 99
1 2
673 787
10000 999999999
9999 26936
541 161029
469177750 905034453
7053348 76
5000000 97069177
5400 284590
44 51564320
423188735 20
5031 2603449
9869327 58
26080573 258353709
1000 79999
1 5249
781765431 7710649
993503 396514
752 248530592
4 866
84622 52
918737277 857009955
527444633 69941
655431187 31101186
433611193 810477381
141 1308615
14030 63650
109151262 4450
73 4712969
106 33
1192713 9
429861686 331776
4000 689066070
400553 9000000
640697067 364
95134418 421055785
5469379 20000000
334 806848767
16 2533
666666 9
3118258 90352
83219296 741233537
766 7
1388639 58859
250 413
105220258 876900448
978683726 7777777
68281 58167418
8456416 464134515
5805166 37907
100000 999999
3185184 6193638
87 221
43 323858487
9877 646765528
795 582413441
5999 1000
4 180132286
352905 96037
9999999 10000
55555555 56669
16840 730225446
498152040 379319533
1000000 1999999
117879610 9873543
111111 888582065
697 182
28 4193669
82 1
538579188 929500
1000000 9999999
139 27619492
65012357 2
11111111 4444
34198 97
137567 5419646
100000000 999999999
280426369 40332
100000 599999999
799999 10000
10 447161797
2262 442022605
663635979 89
10 99999
749809 2554025
161 22155041
746889716 40129
910900112 51
9 626
100204588 34
79270 23095
466707 20
7310082 6656
697 416160984
223738677 40
5766 2157
777777777 824457671
222222222 5012915
299475 268363447
831794 88
91779360 51258
774290012 823
45785 36060740
75 575332081
490 6701633
24779929 6
3707 204036669
117620536 512
6 508239540
534 1111
6000 3
839438 63135275
711694161 5420518
52804777 9492
9177117 2
74 547046903
29270 914495444
5000 4449
38 51
999999999 10000000
8857856 8729
94114922 715651908
44834283 577707776
948 4192
332636462 963940
558 512287596
583098 4383
58 7369671
500 85379858
3048 27157
511625137 68267
670749070 977676200
56 154
40 920424473
843 6230787
6 677693209
33705584 920
7462755 500000
255099 48589926
397179732 965895470
785101100 29
30822 80
9457 70669186
233569215 378968952
381011682 1517913
79999 100
96 72
687292153 5927
810734164 17
61463336 918595792
1111 2
644 30
1426544 841616
77 126708
30433661 8691
51028781 19202
66013 50
528132003 87956
780 3
473181821 103613787
8262340 6143551
447005 738059645
99 10
92 982
272865053 248194270
256333 9055262
814930774 5053
666 679716172
5398918 6
954532522 466
24106624 76220969
500 41
898382134 77104683
70770410 77777
7 6526
243363 6435
853013893 3
914625263 4767
99999999 1
70 71336
13045 939
100 299999
98 45638
2172054 632294213
8000 50157
88888888 503203397
48 48356539
160152675 60000000
333333333 500000000
534026 293378
483 1111111
485492 862817519
37898771 253656171
764 6602043
504390939 113
550 95375
840385 99
1 4576
100 19999
222514 5396
839193325 40
70255437 594121903
8645 820735190
699999999 10000000
380999408 2000
699496983 537362
1830765 99951670
7 73387170
32662144 10000
63465374 372414775
774130597 550
30 61294
219551113 875886245
10 19999999
432 43218
3333 7521
93985 531312555
929464361 1
132 444444
1 2999999
1999999 100
91805797 2725
2700 906554338
49999999 10000
44 6982
81 21242737
616119881 482690
408 222222222
2444297 777
777 123046
588 328
9052071 196285274
9999999 10
5000 77656188
343360079 95540711
7234 314172300
132693304 867151186
367061810 77777777
7865 519490601
5999999 1000
90 6
2518142 41288526
16 289366743
63036 50000000
869715 33
556112809 351981496
5 339189837
79326 767
666666666 6
83 735628526
70696 815876
4999999 10000
102152 3
75 9570
400142169 572795461
835870410 8190815
666666666 800000000
22988 802390
3290873 65054502
42359 271
4 25
517290745 327303405
280815813 2359222
999 10
394854280 883
4221971 7
67375 9461
288 3
21564 72246
257 1111
6015 77777777
6964526 8000000
5532 22423
1 9999999
21 5603
1111 27795074
7931322 370148066
20 108680720
599999999 1
7558241 73
635889 896284656
223145663 959746585
99999 10
912106578 826092677
901 317442490
8366 828109117
125342 999999999
9999999 6234222
6473914 376
3494130 498626681
707800840 822
508 70203
35 82283
80944 880518883
38609475 3186436
55551467 53
5555 17648
78141 961258640
80000 686213
9986 8066554
945055144 38
200000000 9
13485 38
9813 822465506
352 8350
34 788537
8879312 878619
453650 48875440
4 8008082
16042 66666666
1413 3
774 881894338
555555 894784139
767 7409
457598421 820775119
402 732558
8443 81
146175027 14527
24420138 58
2235604 96077
2000000 333
9999 427678419
62 3578
6120567 297642802
8903151 881216086
948634184 77
65349 44849979
737147399 57997815
213538999 2222222
3 100
846 206116
9 27
194054 57249
50000 44516575
3849658 94
2879 2
108071745 2627090
53 48830451
337934251 91602
40975205 127223469
1 89999999
60 6401
709577532 5682
666666666 111
91 28679433
28 55
473 888888
336 36447845
2528137 4444
628875398 2
4941 361002617
916 53569
999999999 1000
21195202 2710845
903 6
8888 858901
331338239 4
649704025 395565
487634965 37576641
15 93553403
102101123 528888950
9999 633454548
130 1111
264597922 793869789
401 67271078
25819923 694930980
712 495320273
72692 498
45 651
567345308 635247304
5021 191
3170 496823466
67 92
661867898 466059338
94275 58
259935956 89885
693096676 585
3039467 47529
5682 111111
72121 35730
541 298185
1 19
337514224 71083
80944787 72245201
11 36058687
875101424 3663
167 100000000
72454 898195217
4717 682468798
5999999 1000000
10 999999
7501 8
384 42478
446039633 772602215
752453223 9
53272 282897878
97328 706217518
100 999999999
777 445873444
400550642 93144
946502 4
248 425779038
899999999 10000000
3 2
822 681750431
100000000 953608
861618050 9
1000000 134
54568 62836815
90859506 70813698
53822280 392
5 59
654 8410
203257382 40
8888 50000000
460484407 793503928
94278167 777
641761322 489026789
284753429 6252355
11440663 77
67258 691
51466 97364850
291295231 400
6 7907458
970 42
68 62804
1 99999999
297 889
89684 9135
1 85773140
4765352 693468
434654174 385371
8260 853311
3 500819055
94793301 112
928902747 700000
88864048 31831414
488118967 10253795
44 964998969
707 670854
772 807587624
5089740 697708009
267083370 1
999999999 701833492
777 80654
503872455 1550
5282992 215201397
270938687 87152
1000000 999999999
66666 52
81505321 400000000
1604799 920107292
977994 53513137
55601133 460832
78 38553
758799639 83700
500 600000000
480456106 567530
999999 100
7208596 857974348
7 554014
3000000 411880406
526607399 726
8902 421022002
222222 83959
312098492 527
81316 52022
3237 249800886
497759859 351347539
473738140 81154
6119 67912
1000 59999
11692519 793219
59534122 27008313
114996433 9079
769296959 26877977
4575 4143
806 54
818548029 9888
8688844 4
7085 999999
79481 800
7811571 9
10000000 222
75 69
987198 950502
8452223 19
60938767 8609
2 9
934915949 800000000
5 4770702
7075879 4
3 39972069
876008299 8373
769088 7406
8020877 348004239
1 999999
280887720 7013628
1 99
168343401 6229
6732664 700000000
865 31676850
2999999 10
920243275 581957919
2179952 18164
1 733729408
9 1
93671 160
40496039 716497542
8994 33333333
62177846 192
10000000 399999999
3842 167412683
383972 86
417 53737
7342 222
1 1749
39401820 489070
6673 501799732
809305142 882948
7557 727262016
33594906 62525604
31 724127944
129973223 3902
192939 50
96079 186
80814 300
5 895307430
1000000 7
895945341 1
4 1401657
793950714 30
3285 6842
1080888 70
844348 4
55914 230044277
27 555545227
23 3399
48408857 15836
43967 322882896
100000 5095323
602016990 8285883
9481 51917
94785304 473221308
6 401010418
2 680385854
40000 990029805
1 99999
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
2
4
6
1
3
0
2
4
1
3
0
2
0
0
0
5
1
3
1
1
3
2
0
1
3
4
1
2
2
2
0
3
3
2
2
0
2
1
2
0
2
1
0
7
0
0
1
0
8
1
5
5
4
4
1
2
9
7
2
6
1
1
1
2
4
2
4
2
1
4
1
0
2
2
1
1
4
3
0
2
0
3
3
2
5
1
1
1
1
3
0
4
2
3
3
2
5
7
4
0
1
1
4
0
2
1
2
1
2
2
7
0
3
0
1
1
3
2
2
2
1
2
6
2
0
2
1
3
7
0
3
4
0
8
0
6
0
3
0
5
1
1
1
7
2
7
3
2
0
1
1
1
1
2
0
1
0
2
4
0
5
0
2
3
1
5
3
7
3
1
0
1
1
0
1
0
0
0
3
6
1
1
1
1
0
4
2
6
4
2
1
3
0
1
2
1
8
3
2
0
4
3
1
0
0
1
4
4
3
2
1
3
0
9
3
2
3
4
3
1
0
4
5
1
2
3
0
3
4
5
1
0
3
1
3
2
1
3
6
1
3
1
3
2
5
7
1
1
3
0
6
2
1
0
2
4
1
3
1
1
0
1
1
3
2
4
6
3
2
1
0
2
5
7
3
0
1
1
3
3
2
1
2
2
2
0
1
1
4
4
1
5
0
1
0
2
1
0
0
0
1
0
3
1
1
4
1
2
3
4
0
5
2
4
1
0
0
5
1
1
0
1
3
1
8
1
7
1
4
1
2
0

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1teebee490.14992016/03/01 10:27:210B / 20B / 26B
2mitchs490.13652016/03/27 00:06:400B / 20B / 25B
3olf520.19072016/03/22 01:42:480B / 25B / 25B
4xsot520.07122016/05/21 16:26:160B / 24B / 25B

Ruby2 _

RankUserSizeTimeDateStatistics
1teebee490.30952016/03/02 05:38:330B / 20B / 26B
2mitchs490.23032016/03/27 00:11:330B / 20B / 25B
3olf520.59152016/03/23 02:46:560B / 25B / 25B
4xsot530.16912016/05/21 16:46:350B / 24B / 26B

Perl _

RankUserSizeTimeDateStatistics
1llhuii480.03842016/03/12 15:21:060B / 14B / 31B
2tails480.02652016/03/14 17:10:420B / 14B / 31B
3teebee480.03202016/03/19 06:06:120B / 14B / 31B

Python _

RankUserSizeTimeDateStatistics
1mitchs750.04822016/02/21 03:03:100B / 44B / 29B
2xnor (Sp3000)750.03412016/03/23 12:33:540B / ?B / ?B
3xnor770.03752016/02/23 19:03:170B / ?B / ?B
4llhuii790.25742016/03/13 12:06:230B / 42B / 34B
5Sp3000800.19512016/02/23 18:08:020B / ?B / ?B
6hallvabo800.08682016/10/10 02:05:540B / 44B / 36B
7tryeng850.03762016/10/11 02:20:470B / ?B / ?B
8test861.41942016/10/04 00:49:420B / ?B / ?B
9Da861.41642016/10/07 23:00:120B / ?B / ?B
10rolf960.29062016/02/20 06:15:440B / 58B / 36B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs760.16002016/02/21 03:22:230B / 44B / 30B

PHP _

RankUserSizeTimeDateStatistics
1teebee890.03052016/08/27 07:57:465B / 38B / 46B
2activekim980.14712016/08/30 17:38:575B / 44B / 49B
3activekim(Symbol)1230.10932016/08/26 16:57:192B / 58B / 63B
4Antony1630.12022016/08/19 05:17:380B / 76B / 85B

Common LISP _

RankUserSizeTimeDateStatistics
1ttmh1470.47062016/02/23 19:48:200B / 83B / 48B

Io _

RankUserSizeTimeDateStatistics
1teebee1120.21832016/07/24 07:10:060B / 79B / 29B

JavaScript _

RankUserSizeTimeDateStatistics
1teebee760.32242016/02/22 10:43:050B / 42B / 33B
2FizzyTea760.10842016/02/22 18:42:000B / 42B / 33B

REXX _

RankUserSizeTimeDateStatistics
1teebee670.08302016/02/22 07:22:100B / 39B / 23B
2mitchs670.08552016/03/27 00:34:340B / 39B / 14B

K _

RankUserSizeTimeDateStatistics
1teebee330.02722016/02/21 18:55:050B / 9B / 24B

C _

RankUserSizeTimeDateStatistics
1llhuii850.01112016/03/13 12:21:070B / 43B / 42B
2nai940.01342016/08/05 19:13:100B / 47B / 47B
3chocobi980.01392016/03/10 09:20:140B / 51B / 47B

Java _

RankUserSizeTimeDateStatistics
1teebee1700.26972016/02/22 05:20:170B / 107B / 57B
2megamoff4760.33012016/12/05 04:08:020B / 291B / 168B

AWK _

RankUserSizeTimeDateStatistics
1llhuii410.22902016/03/12 19:05:380B / 18B / 23B
2mitchs410.26372016/03/28 23:48:170B / 18B / 23B
3teebee420.32002016/02/21 02:45:090B / 18B / 24B
4olf460.01692016/11/13 04:16:260B / 20B / 26B
5FizzyTea470.02142016/02/22 10:45:190B / 24B / 22B

sed _

RankUserSizeTimeDateStatistics
1tails1290.09032016/06/28 09:24:190B / 47B / 70B
2%201300.09312016/06/28 02:48:190B / 49B / 70B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1teebee532.48002016/03/20 19:32:370B / 22B / 26B
2tails532.16922016/05/17 20:03:300B / 23B / 25B
3llhuii532.22282017/06/11 15:21:290B / 23B / 25B

bc _

RankUserSizeTimeDateStatistics
1teebee740.12752016/02/21 06:20:220B / 37B / 36B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii410.29322016/03/12 19:06:200B / 18B / 23B
2mitchs410.25092016/03/28 23:48:560B / 18B / 23B

R _

RankUserSizeTimeDateStatistics
1olf830.17592016/11/13 03:13:000B / 46B / 32B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs1900.19182016/02/23 16:09:230B / 0B / 190B

GolfScript _

RankUserSizeTimeDateStatistics
1mitchs281.41922016/02/22 13:12:350B / 6B / 22B
2tails281.07982016/02/23 10:07:440B / 6B / 22B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs140.25122016/02/20 11:15:262B / 9B / 3B

FerNANDo _

RankUserSizeTimeDateStatistics
1%2014971.61012016/03/16 06:26:410B / 479B / 270B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs1410000
2GolfScriptmitchs285000
3Kteebee334242
4AWKllhuii413414
5xgawkllhuii413414
6Perlllhuii482916
7Rubyteebee492857
8Ruby2teebee492857
9Bash (builtins)teebee532641
10REXXteebee672089
11bcteebee741891
12Pythonmitchs751866
13Python3mitchs761842
14JavaScriptteebee761842
15Rolf831686
16Cllhuii851647
17PHPteebee891573
18Ioteebee1121250
19sedtails1291085
20Common LISPttmh147952
21Javateebee170823
22Brainfuckmitchs190736
23FerNANDo%20149793

return top