Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pstrong's Acceptance and Unit Tests

  • Loading branch information...
commit 4b43cba0fceba88ce90b1cc9a15ac8563ca2ed2d 1 parent dec7dc9
@lapluviosilla lapluviosilla authored
View
1,000 pstrong-RunCollatz.in
@@ -0,0 +1,1000 @@
+12 1089
+1072 624
+2118 3237
+3740 3812
+365 851
+1728 25
+3136 3519
+5248 4745
+2439 4103
+1430 2096
+4202 3957
+4524 6129
+9919 11609
+3248 2274
+9480 10604
+11632 10348
+8126 8173
+16218 15245
+3173 2593
+960 2068
+5124 4813
+15774 17196
+6026 6539
+15432 15742
+21825 19836
+8164 7201
+12771 13036
+3220 3450
+3654 2644
+8040 6401
+20026 19730
+5408 7242
+16137 15793
+9656 10196
+28000 27837
+32364 31895
+16650 17667
+17366 17163
+17784 19560
+36680 37853
+1435 2516
+22386 24303
+25112 24991
+25828 25004
+23625 21697
+1380 17
+9306 8186
+37872 39227
+20972 22113
+19500 20225
+33609 34898
+17784 16941
+24963 24591
+22356 23774
+23265 23051
+39648 38783
+25365 25783
+57884 56246
+6431 6791
+18960 19065
+21289 20255
+33046 31531
+59787 59250
+25152 23597
+10140 11201
+2442 4141
+15812 15431
+22304 22935
+44298 44339
+7700 7011
+21087 20002
+62064 62656
+41099 42952
+39294 38732
+27450 26159
+47576 47097
+70994 72164
+18720 18801
+1738 3084
+1200 441
+57267 57340
+15006 16066
+52456 50780
+32004 31158
+15725 16089
+29670 29378
+66033 65069
+87472 85587
+45123 46154
+69750 68186
+33943 35007
+89148 90786
+61845 63396
+56306 58076
+90725 89352
+54528 53433
+85069 85541
+47824 48521
+82467 82784
+28000 28734
+83325 85142
+62118 63049
+68289 66791
+62608 61328
+31080 32992
+104728 106318
+25466 26564
+32508 34268
+5668 5626
+106480 107467
+89133 89892
+57232 57485
+91191 92681
+65322 65077
+64515 63277
+20648 19671
+27144 26624
+106436 106810
+1547 407
+108720 109401
+117007 118820
+62586 62512
+61254 62948
+33480 33013
+124375 126233
+86436 86330
+72644 73581
+61952 63140
+44118 42626
+122330 120881
+80827 81117
+126192 125066
+131936 130785
+19564 18837
+132705 132544
+8296 8802
+59184 60192
+53268 53829
+80342 80824
+12600 13949
+10716 10668
+93862 95720
+138567 137803
+67104 68288
+98890 98954
+21462 23014
+100401 98472
+56092 54583
+83142 82445
+114900 113498
+74896 74169
+122968 124775
+117963 119159
+37422 39309
+44640 45541
+59280 59965
+21195 20406
+153892 154551
+9699 11266
+38080 36650
+4508 4515
+123606 124445
+21353 22256
+33292 32709
+69630 68882
+103418 104145
+95691 93796
+20664 22077
+95316 97059
+3400 4239
+74556 74885
+7224 8022
+64875 66212
+93612 94562
+148225 146288
+118272 117157
+22833 24074
+105376 104500
+36874 37286
+42660 44617
+84527 83774
+10920 12452
+111264 109727
+167992 167931
+139675 141068
+127968 128731
+92378 93465
+128404 126799
+104139 103993
+22230 20909
+60929 59943
+62592 62851
+48829 50268
+153842 152591
+99060 100284
+179340 178886
+74860 76517
+121374 120263
+54526 55829
+197800 197579
+163614 162832
+134532 134163
+50547 51956
+199716 198454
+109470 107805
+24308 24740
+10557 9838
+169520 170875
+143583 141667
+20790 21555
+190533 191746
+98368 96664
+22578 22633
+176336 176849
+165550 167185
+129168 128171
+8897 10226
+73030 71062
+203670 203679
+199320 199489
+76908 77877
+109446 110105
+200031 199874
+4928 4456
+123750 123778
+185094 186419
+16117 14430
+9804 8185
+112897 114281
+44620 45848
+107184 105587
+92568 92681
+26329 25815
+167310 167152
+110685 109146
+65844 65435
+21093 22644
+71162 72953
+189049 190061
+232560 234334
+104594 104337
+160204 158577
+52488 51788
+5124 6210
+187425 187763
+205164 206968
+155116 156445
+101432 101789
+61254 60149
+102750 102310
+55722 56507
+133812 132309
+120175 119997
+194310 194381
+92310 91446
+250624 251866
+74530 75869
+89010 88092
+2590 3808
+228020 226101
+228375 227191
+202002 202410
+60753 59771
+150744 150055
+180995 182721
+46284 47983
+32841 31761
+226996 225466
+19637 18979
+182790 182760
+134958 135066
+126752 126957
+45591 44995
+38086 37179
+125950 126759
+48576 47181
+11911 10496
+133996 134392
+246078 247894
+52080 51593
+64068 63644
+3666 4801
+58015 57518
+184032 185451
+257070 255546
+234806 234207
+91553 92717
+262656 261190
+202300 201840
+11600 11882
+135606 133900
+115632 115960
+200119 198134
+266952 267474
+148385 149363
+61272 61953
+216513 215967
+91784 93439
+249067 250845
+247200 247024
+86989 86331
+71574 73224
+18180 19896
+53200 55061
+133590 135160
+115974 117041
+169464 170030
+31724 33555
+40479 39329
+152520 151505
+120357 121576
+170040 169971
+227864 227906
+209752 208180
+277200 277002
+47716 49478
+207635 206135
+221328 219829
+311025 310519
+177280 176551
+188427 188845
+263396 262462
+236436 235672
+253044 253533
+171600 173379
+93236 94408
+172656 173911
+213528 214966
+194768 195870
+185130 183436
+1655 1534
+13612 15593
+173160 173501
+176352 177434
+309205 309153
+246624 246260
+149965 149013
+319410 321196
+60003 60052
+311100 310347
+201872 200602
+94734 96036
+218491 219688
+100104 101546
+280485 279029
+47056 48471
+177317 178767
+151032 152656
+90391 89268
+9100 9780
+220077 220194
+87648 86906
+328290 330126
+270456 271512
+310625 309860
+126024 125976
+298095 299737
+172556 172929
+56004 57513
+200520 199068
+181944 181461
+230956 232362
+67155 66871
+263900 265588
+213160 212965
+140544 138802
+117807 116218
+32016 32858
+117342 116494
+112110 110386
+36729 37246
+62868 62754
+64529 63695
+115940 116560
+54000 52890
+191760 192508
+141375 140094
+143640 145461
+236875 235716
+286140 286833
+151257 149260
+82894 82575
+41747 42463
+61440 62166
+69300 69489
+358594 358876
+290250 291173
+330188 328857
+136539 138154
+40560 41990
+343689 345019
+257936 258287
+282960 281760
+120564 120420
+25280 23823
+164736 164050
+380723 381287
+199000 198476
+21945 22809
+243200 243124
+32481 33766
+141102 142371
+142662 144302
+317948 319593
+17415 18375
+338604 340332
+197802 196705
+181968 180780
+63395 63944
+312420 310579
+6987 8170
+211768 212363
+71449 70571
+313398 311824
+185090 183633
+221728 223223
+371547 369990
+17974 18492
+150421 150771
+118020 119791
+375953 377609
+266704 267762
+337131 335496
+399832 398654
+229075 228202
+309276 310422
+102053 100247
+104004 102943
+296868 296055
+178020 179954
+53875 53917
+361152 360539
+358091 358174
+341558 340081
+261870 260629
+216692 216159
+23598 25315
+385440 387305
+88678 88300
+407880 408689
+304290 305384
+16354 14474
+218842 217855
+298368 297983
+262550 260923
+103472 105449
+36654 34685
+146944 147539
+155354 155897
+2250 2009
+90651 92406
+226904 226181
+148584 147740
+18160 17105
+384020 385604
+396264 396929
+214333 215402
+203810 204037
+15606 15563
+434240 435779
+289969 289163
+383460 385133
+290764 292404
+254272 255605
+56265 55295
+235330 236393
+202211 203961
+116064 114544
+423976 423643
+121260 122849
+165792 164324
+258184 258333
+435633 436785
+191022 191705
+73625 75564
+473620 474758
+341055 339720
+448842 449552
+428705 427545
+63840 61859
+456469 456053
+77602 77723
+144900 144055
+302500 303134
+421465 421560
+168156 169635
+412489 411599
+81496 83209
+374574 372614
+2450 3430
+338299 340098
+251904 250302
+355946 357513
+401622 403005
+120285 120202
+231136 232733
+214207 215579
+254976 254634
+403192 403910
+135500 133946
+212925 214472
+69276 68892
+213775 214957
+305424 304183
+336330 337517
+237820 237760
+122694 121832
+274320 275580
+257554 259406
+451350 452302
+278495 277358
+18432 17308
+274968 274382
+163966 163280
+166860 164911
+278124 278172
+260051 259514
+455322 454661
+128193 128577
+516360 516736
+144317 144600
+203058 202279
+229597 230973
+370992 370200
+401100 400200
+317704 318346
+381021 380826
+421872 422340
+112677 111427
+225780 225736
+518787 518015
+296324 294788
+211068 212775
+283020 283641
+199020 199288
+98624 99444
+434433 435342
+353466 351828
+213444 214098
+137160 135574
+307829 309077
+211380 211890
+188964 189827
+317696 317981
+295390 296766
+31668 32471
+164100 163615
+138096 139883
+9333 7772
+48950 50789
+145464 145503
+175536 174820
+343413 343036
+96950 96602
+538350 538578
+443132 441711
+158188 158757
+25110 27107
+226954 226300
+390880 392209
+460020 460546
+187146 186129
+548925 550453
+98700 98382
+389850 389148
+24904 26336
+432621 433726
+356704 357168
+142819 142040
+327750 327207
+136469 137154
+556556 557134
+144396 144711
+392042 391799
+2300 4132
+152640 151918
+553343 553032
+531182 532668
+183543 184945
+443120 443871
+397404 398926
+380046 379593
+245443 243560
+475960 476275
+531765 530436
+249636 248254
+581717 582948
+223440 223849
+220286 219185
+11800 12343
+18321 18730
+149184 150687
+223561 222156
+291654 291351
+444465 444572
+579908 579697
+311037 309924
+460460 461715
+174309 175330
+274800 273660
+501234 501763
+375046 375007
+34974 33883
+5436 5277
+298265 298503
+375720 377121
+243407 243718
+444448 445622
+14616 12920
+526430 524706
+25662 24597
+119340 118548
+415001 414971
+276914 275433
+140220 139003
+530376 529530
+227056 225489
+470298 471451
+354687 353996
+589000 587208
+501147 502740
+330904 330900
+156996 155252
+96720 96412
+440625 440671
+134590 134540
+420090 420231
+62172 60210
+113849 113385
+250740 251695
+229684 228247
+488536 487588
+282951 281585
+314464 313588
+365760 366372
+20988 22801
+58604 59746
+612480 614198
+387873 388411
+264320 262359
+383959 383291
+240108 239424
+10931 10638
+74704 74420
+7095 8616
+261630 261182
+45290 43297
+130896 131734
+318010 317656
+67600 69236
+193998 192774
+502692 504386
+342825 344138
+24852 22887
+465050 464206
+539232 537394
+442818 444129
+471786 473329
+202313 203536
+545160 546112
+402549 403313
+16550 15015
+95472 96251
+190568 188750
+351120 349729
+514818 513861
+122061 123020
+350032 350262
+589389 590573
+418080 418153
+132187 132477
+10080 8959
+249683 248454
+653106 652314
+585225 586554
+442780 444549
+319544 317900
+462396 463030
+609742 610311
+608600 607137
+374550 374857
+197098 197457
+247929 247901
+80028 78065
+94530 95285
+360836 360476
+528303 528918
+593744 593488
+604253 604556
+228390 229580
+223884 224956
+579204 578245
+201663 199859
+280376 279413
+398235 397849
+394632 395674
+139400 140103
+465566 466313
+253038 251281
+667100 668472
+602860 601041
+477360 479141
+43586 45265
+332992 333872
+81780 81184
+436308 438240
+682962 682143
+562152 563922
+419728 418302
+450140 451682
+651276 652731
+699896 698979
+300173 300533
+388416 390342
+316745 317723
+698816 699101
+48756 50702
+440852 441083
+277534 276630
+257760 255880
+276864 276008
+626696 627410
+391143 391248
+157108 155139
+409625 411273
+696960 698000
+391853 392190
+567112 566941
+475308 475540
+46720 47304
+638163 637306
+677832 675992
+172988 174941
+438932 440214
+732795 734203
+506368 504971
+503371 504797
+366786 366139
+297817 299460
+332260 333200
+21489 21356
+534982 536649
+78758 78065
+612312 610356
+421670 422085
+263338 264905
+294318 294989
+14212 12349
+156541 155254
+396000 394205
+588033 586578
+736960 737505
+649839 650482
+723086 724741
+489995 489042
+596484 598063
+331566 329828
+425996 425022
+14421 12480
+361000 361374
+215363 214007
+564642 563415
+685937 686253
+209336 208883
+724455 724753
+683272 683274
+262314 261485
+275712 275568
+349126 347952
+739970 741861
+198147 199581
+666236 664559
+229581 227741
+58824 58004
+664175 665796
+439992 438501
+416472 417834
+606062 605467
+352887 352483
+574860 575058
+402996 404338
+39100 40727
+434565 434200
+595840 596442
+234715 236250
+363918 362073
+191241 192828
+55160 56588
+41817 40599
+61620 61033
+286342 287091
+533808 534676
+102297 104214
+250110 248168
+465870 465399
+757792 755820
+668683 668154
+402192 401306
+546516 547771
+381600 382211
+388485 388820
+538944 539942
+794970 796323
+603804 602126
+317975 316267
+798746 797276
+634302 635488
+70296 71511
+10517 12220
+630990 629324
+180042 179034
+495320 496548
+255282 256006
+313390 313032
+550940 549469
+716448 716699
+586606 586883
+420452 418621
+534807 535409
+734720 735395
+229059 230078
+34524 35530
+102052 101019
+304880 306093
+820050 821531
+113988 115705
+599575 597756
+820548 819209
+439370 439780
+550290 550164
+111354 111583
+713856 713681
+733873 733162
+487056 487689
+364060 364794
+677160 679092
+313875 313331
+704758 706740
+208911 210118
+806400 807232
+147175 145783
+412580 412984
+487254 486252
+182304 180503
+291525 292010
+487296 487089
+557326 557258
+742000 741720
+764100 763129
+448800 450380
+187220 185934
+110760 111512
+166335 166981
+763476 764272
+97470 97472
+529864 529390
+706168 706288
+547404 548738
+743894 744929
+107500 106528
+324597 325075
+586160 586791
+640346 640431
+112320 112273
+104665 103431
+380174 378224
+344199 343404
+362824 363582
+690855 692233
+796920 797364
+361465 360073
+789160 790181
+833715 835230
+40204 40788
+41125 39242
+155052 155507
+874369 876019
+402124 403931
+267216 265290
+638880 640765
+798186 799460
+287532 288927
+296688 295004
+472056 473487
+609765 611234
+716774 716426
+821362 823347
+679320 678162
+589407 590296
+490390 489622
+842886 844731
+198024 197463
+495615 497548
+507792 508945
+272975 272566
+326144 324903
+631488 630686
+489410 487711
+121365 121462
+237600 238093
+706384 704698
+386056 387775
+106554 106275
+374256 375667
+594585 595798
+29898 28270
+200447 200139
+286928 285140
+589032 587958
+899990 901417
+386264 386902
+472416 473253
+201773 203697
+795180 796074
+135420 133450
+544104 545091
+810628 808675
+699516 700792
+60654 59890
+861120 861658
+172227 173623
+342984 344085
+664560 665142
+680988 681062
+530025 530563
+828770 829830
+622017 622141
+455648 455852
+826810 827351
+52080 51194
+247646 249613
+589956 591175
+639105 639101
+753738 754793
+865810 865986
+846144 847253
+481618 480991
+723198 723167
+523023 522573
+639200 637424
+868543 869546
+759252 757468
+115046 116055
+53808 52781
+32130 30665
+781396 782109
+716879 718666
+128928 129157
+347334 345379
+666900 666272
+239652 240103
+315112 315951
+145809 144225
+898668 898241
+621705 621674
+516240 516414
+238293 239051
+126456 126944
+889952 890819
+216000 215928
+780332 778657
+705146 703506
+787734 789672
+854104 853035
+499870 500853
+540960 542450
+347153 348250
+862488 862763
+360468 359957
+708100 706910
+263141 264269
+898128 896462
+183897 183145
+572712 571062
+109200 108994
+223504 222859
+265744 264396
+7824 7571
+410201 411451
+87220 88752
+39240 39194
+543046 542643
+241818 242930
+84624 85387
+955450 954187
+119306 118715
+43428 44517
+955396 955644
+326370 328223
+264330 265226
+967216 967370
+450368 451492
+150936 150905
+465192 463695
+688540 689203
+923292 923624
+413755 414521
+766464 764933
+105894 105777
+674000 673407
View
1,000 pstrong-RunCollatz.out
@@ -0,0 +1,1000 @@
+12 1089 179
+1072 624 179
+2118 3237 217
+3740 3812 176
+365 851 171
+1728 25 182
+3136 3519 199
+5248 4745 210
+2439 4103 238
+1430 2096 180
+4202 3957 189
+4524 6129 236
+9919 11609 268
+3248 2274 217
+9480 10604 255
+11632 10348 268
+8126 8173 190
+16218 15245 253
+3173 2593 217
+960 2068 182
+5124 4813 210
+15774 17196 266
+6026 6539 262
+15432 15742 253
+21825 19836 274
+8164 7201 252
+12771 13036 201
+3220 3450 181
+3654 2644 217
+8040 6401 257
+20026 19730 274
+5408 7242 262
+16137 15793 253
+9656 10196 242
+28000 27837 259
+32364 31895 254
+16650 17667 279
+17366 17163 235
+17784 19560 261
+36680 37853 306
+1435 2516 209
+22386 24303 282
+25112 24991 233
+25828 25004 264
+23625 21697 282
+1380 17 182
+9306 8186 260
+37872 39227 275
+20972 22113 269
+19500 20225 274
+33609 34898 311
+17784 16941 279
+24963 24591 264
+22356 23774 282
+23265 23051 207
+39648 38783 275
+25365 25783 246
+57884 56246 304
+6431 6791 244
+18960 19065 199
+21289 20255 256
+33046 31531 285
+59787 59250 273
+25152 23597 264
+10140 11201 268
+2442 4141 238
+15812 15431 253
+22304 22935 269
+44298 44339 239
+7700 7011 239
+21087 20002 256
+62064 62656 255
+41099 42952 288
+39294 38732 275
+27450 26159 308
+47576 47097 314
+70994 72164 325
+18720 18801 230
+1738 3084 217
+1200 441 182
+57267 57340 229
+15006 16066 271
+52456 50780 309
+32004 31158 285
+15725 16089 253
+29670 29378 272
+66033 65069 268
+87472 85587 333
+45123 46154 314
+69750 68186 312
+33943 35007 311
+89148 90786 315
+61845 63396 330
+56306 58076 304
+90725 89352 315
+54528 53433 322
+85069 85541 289
+47824 48521 252
+82467 82784 320
+28000 28734 259
+83325 85142 320
+62118 63049 286
+68289 66791 312
+62608 61328 317
+31080 32992 285
+104728 106318 354
+25466 26564 277
+32508 34268 311
+5668 5626 174
+106480 107467 323
+89133 89892 302
+57232 57485 260
+91191 92681 333
+65322 65077 224
+64515 63277 330
+20648 19671 274
+27144 26624 259
+106436 106810 310
+1547 407 182
+108720 109401 292
+117007 118820 336
+62586 62512 255
+61254 62948 317
+33480 33013 267
+124375 126233 318
+86436 86330 196
+72644 73581 294
+61952 63140 317
+44118 42626 270
+122330 120881 336
+80827 81117 276
+126192 125066 318
+131936 130785 300
+19564 18837 261
+132705 132544 207
+8296 8802 234
+59184 60192 317
+53268 53829 322
+80342 80824 276
+12600 13949 276
+10716 10668 193
+93862 95720 328
+138567 137803 313
+67104 68288 312
+98890 98954 173
+21462 23014 269
+100401 98472 341
+56092 54583 260
+83142 82445 320
+114900 113498 305
+74896 74169 325
+122968 124775 331
+117963 119159 336
+37422 39309 306
+44640 45541 314
+59280 59965 304
+21195 20406 256
+153892 154551 352
+9699 11266 268
+38080 36650 306
+4508 4515 184
+123606 124445 318
+21353 22256 269
+33292 32709 267
+69630 68882 299
+103418 104145 279
+95691 93796 328
+20664 22077 269
+95316 97059 297
+3400 4239 238
+74556 74885 325
+7224 8022 252
+64875 66212 268
+93612 94562 284
+148225 146288 357
+118272 117157 336
+22833 24074 282
+105376 104500 341
+36874 37286 262
+42660 44617 270
+84527 83774 320
+10920 12452 268
+111264 109727 310
+167992 167931 184
+139675 141068 344
+127968 128731 331
+92378 93465 315
+128404 126799 331
+104139 103993 279
+22230 20909 269
+60929 59943 317
+62592 62851 286
+48829 50268 296
+153842 152591 308
+99060 100284 341
+179340 178886 272
+74860 76517 307
+121374 120263 318
+54526 55829 260
+197800 197579 267
+163614 162832 259
+134532 134163 269
+50547 51956 309
+199716 198454 329
+109470 107805 292
+24308 24740 264
+10557 9838 255
+169520 170875 290
+143583 141667 375
+20790 21555 256
+190533 191746 329
+98368 96664 297
+22578 22633 207
+176336 176849 303
+165550 167185 352
+129168 128171 331
+8897 10226 260
+73030 71062 325
+203670 203679 192
+199320 199489 329
+76908 77877 351
+109446 110105 310
+200031 199874 311
+4928 4456 210
+123750 123778 212
+185094 186419 316
+16117 14430 271
+9804 8185 260
+112897 114281 305
+44620 45848 314
+107184 105587 354
+92568 92681 284
+26329 25815 246
+167310 167152 321
+110685 109146 310
+65844 65435 268
+21093 22644 269
+71162 72953 325
+189049 190061 360
+232560 234334 381
+104594 104337 279
+160204 158577 352
+52488 51788 278
+5124 6210 262
+187425 187763 316
+205164 206968 373
+155116 156445 383
+101432 101789 310
+61254 60149 335
+102750 102310 310
+55722 56507 322
+133812 132309 331
+120175 119997 287
+194310 194381 192
+92310 91446 333
+250624 251866 319
+74530 75869 325
+89010 88092 302
+2590 3808 238
+228020 226101 368
+228375 227191 337
+202002 202410 298
+60753 59771 317
+150744 150055 339
+180995 182721 316
+46284 47983 314
+32841 31761 267
+226996 225466 368
+19637 18979 274
+182790 182760 223
+134958 135066 207
+126752 126957 331
+45591 44995 314
+38086 37179 306
+125950 126759 318
+48576 47181 314
+11911 10496 268
+133996 134392 269
+246078 247894 350
+52080 51593 278
+64068 63644 255
+3666 4801 238
+58015 57518 273
+184032 185451 329
+257070 255546 345
+234806 234207 381
+91553 92717 302
+262656 261190 332
+202300 201840 298
+11600 11882 219
+135606 133900 344
+115632 115960 323
+200119 198134 329
+266952 267474 345
+148385 149363 326
+61272 61953 286
+216513 215967 386
+91784 93439 315
+249067 250845 332
+247200 247024 257
+86989 86331 271
+71574 73224 294
+18180 19896 274
+53200 55061 322
+133590 135160 344
+115974 117041 305
+169464 170030 259
+31724 33555 267
+40479 39329 306
+152520 151505 308
+120357 121576 287
+170040 169971 290
+227864 227906 200
+209752 208180 311
+277200 277002 252
+47716 49478 296
+207635 206135 373
+221328 219829 355
+311025 310519 371
+177280 176551 303
+188427 188845 316
+263396 262462 407
+236436 235672 337
+253044 253533 306
+171600 173379 347
+93236 94408 284
+172656 173911 347
+213528 214966 373
+194768 195870 360
+185130 183436 329
+1655 1534 167
+13612 15593 271
+173160 173501 347
+176352 177434 334
+309205 309153 234
+246624 246260 288
+149965 149013 326
+319410 321196 371
+60003 60052 198
+311100 310347 371
+201872 200602 311
+94734 96036 328
+218491 219688 337
+100104 101546 341
+280485 279029 345
+47056 48471 314
+177317 178767 347
+151032 152656 308
+90391 89268 315
+9100 9780 260
+220077 220194 293
+87648 86906 333
+328290 330126 353
+270456 271512 363
+310625 309860 371
+126024 125976 194
+298095 299737 371
+172556 172929 303
+56004 57513 322
+200520 199068 342
+181944 181461 316
+230956 232362 350
+67155 66871 268
+263900 265588 332
+213160 212965 311
+140544 138802 344
+117807 116218 305
+32016 32858 267
+117342 116494 305
+112110 110386 323
+36729 37246 262
+62868 62754 286
+64529 63695 299
+115940 116560 305
+54000 52890 322
+191760 192508 329
+141375 140094 326
+143640 145461 326
+236875 235716 337
+286140 286833 314
+151257 149260 370
+82894 82575 320
+41747 42463 288
+61440 62166 317
+69300 69489 281
+358594 358876 348
+290250 291173 327
+330188 328857 353
+136539 138154 331
+40560 41990 288
+343689 345019 304
+257936 258287 270
+282960 281760 314
+120564 120420 287
+25280 23823 264
+164736 164050 334
+380723 381287 286
+199000 198476 329
+21945 22809 269
+243200 243124 244
+32481 33766 267
+141102 142371 326
+142662 144302 326
+317948 319593 353
+17415 18375 279
+338604 340332 366
+197802 196705 267
+181968 180780 316
+63395 63944 255
+312420 310579 384
+6987 8170 252
+211768 212363 311
+71449 70571 325
+313398 311824 384
+185090 183633 329
+221728 223223 337
+371547 369990 392
+17974 18492 248
+150421 150771 295
+118020 119791 336
+375953 377609 423
+266704 267762 345
+337131 335496 366
+399832 398654 330
+229075 228202 355
+309276 310422 371
+102053 100247 310
+104004 102943 248
+296868 296055 327
+178020 179954 347
+53875 53917 185
+361152 360539 366
+358091 358174 242
+341558 340081 304
+261870 260629 332
+216692 216159 386
+23598 25315 264
+385440 387305 343
+88678 88300 271
+407880 408689 312
+304290 305384 309
+16354 14474 271
+218842 217855 324
+298368 297983 296
+262550 260923 332
+103472 105449 341
+36654 34685 324
+146944 147539 295
+155354 155897 308
+2250 2009 183
+90651 92406 333
+226904 226181 368
+148584 147740 295
+18160 17105 279
+384020 385604 348
+396264 396929 330
+214333 215402 280
+203810 204037 280
+15606 15563 222
+434240 435779 356
+289969 289163 327
+383460 385133 330
+290764 292404 327
+254272 255605 363
+56265 55295 322
+235330 236393 337
+202211 203961 342
+116064 114544 349
+423976 423643 418
+121260 122849 336
+165792 164324 334
+258184 258333 270
+435633 436785 325
+191022 191705 329
+73625 75564 325
+473620 474758 382
+341055 339720 366
+448842 449552 369
+428705 427545 374
+63840 61859 330
+456469 456053 338
+77602 77723 232
+144900 144055 326
+302500 303134 340
+421465 421560 268
+168156 169635 334
+412489 411599 312
+81496 83209 320
+374574 372614 348
+2450 3430 217
+338299 340098 366
+251904 250302 332
+355946 357513 348
+401622 403005 299
+120285 120202 212
+231136 232733 337
+214207 215579 280
+254976 254634 363
+403192 403910 343
+135500 133946 344
+212925 214472 373
+69276 68892 250
+213775 214957 373
+305424 304183 309
+336330 337517 322
+237820 237760 275
+122694 121832 336
+274320 275580 345
+257554 259406 301
+451350 452302 294
+278495 277358 389
+18432 17308 279
+274968 274382 332
+163966 163280 321
+166860 164911 352
+278124 278172 301
+260051 259514 345
+455322 454661 307
+128193 128577 331
+516360 516736 289
+144317 144600 295
+203058 202279 342
+229597 230973 443
+370992 370200 304
+401100 400200 343
+317704 318346 309
+381021 380826 286
+421872 422340 356
+112677 111427 323
+225780 225736 231
+518787 518015 302
+296324 294788 358
+211068 212775 355
+283020 283641 358
+199020 199288 267
+98624 99444 328
+434433 435342 356
+353466 351828 335
+213444 214098 373
+137160 135574 313
+307829 309077 371
+211380 211890 311
+188964 189827 316
+317696 317981 247
+295390 296766 327
+31668 32471 285
+164100 163615 321
+138096 139883 313
+9333 7772 260
+48950 50789 296
+145464 145503 158
+175536 174820 303
+343413 343036 335
+96950 96602 253
+538350 538578 240
+443132 441711 356
+158188 158757 321
+25110 27107 308
+226954 226300 368
+390880 392209 361
+460020 460546 307
+187146 186129 347
+548925 550453 315
+98700 98382 266
+389850 389148 436
+24904 26336 264
+432621 433726 387
+356704 357168 304
+142819 142040 375
+327750 327207 322
+136469 137154 313
+556556 557134 346
+144396 144711 295
+392042 391799 330
+2300 4132 238
+152640 151918 308
+553343 553032 315
+531182 532668 346
+183543 184945 316
+443120 443871 294
+397404 398926 374
+380046 379593 361
+245443 243560 337
+475960 476275 307
+531765 530436 346
+249636 248254 350
+581717 582948 328
+223440 223849 293
+220286 219185 355
+11800 12343 263
+18321 18730 261
+149184 150687 370
+223561 222156 324
+291654 291351 296
+444465 444572 263
+579908 579697 253
+311037 309924 371
+460460 461715 444
+174309 175330 303
+274800 273660 358
+501234 501763 320
+375046 375007 255
+34974 33883 311
+5436 5277 192
+298265 298503 234
+375720 377121 423
+243407 243718 319
+444448 445622 338
+14616 12920 276
+526430 524706 408
+25662 24597 264
+119340 118548 318
+415001 414971 175
+276914 275433 314
+140220 139003 344
+530376 529530 302
+227056 225489 368
+470298 471451 307
+354687 353996 348
+589000 587208 328
+501147 502740 426
+330904 330900 61
+156996 155252 383
+96720 96412 266
+440625 440671 281
+134590 134540 238
+420090 420231 343
+62172 60210 335
+113849 113385 292
+250740 251695 319
+229684 228247 355
+488536 487588 382
+282951 281585 327
+314464 313588 309
+365760 366372 335
+20988 22801 269
+58604 59746 273
+612480 614198 310
+387873 388411 330
+264320 262359 407
+383959 383291 299
+240108 239424 306
+10931 10638 206
+74704 74420 294
+7095 8616 252
+261630 261182 332
+45290 43297 314
+130896 131734 300
+318010 317656 309
+67600 69236 312
+193998 192774 329
+502692 504386 364
+342825 344138 335
+24852 22887 282
+465050 464206 338
+539232 537394 346
+442818 444129 338
+471786 473329 338
+202313 203536 342
+545160 546112 346
+402549 403313 268
+16550 15015 271
+95472 96251 284
+190568 188750 360
+351120 349729 366
+514818 513861 364
+122061 123020 318
+350032 350262 304
+589389 590573 359
+418080 418153 281
+132187 132477 300
+10080 8959 260
+249683 248454 350
+653106 652314 354
+585225 586554 359
+442780 444549 338
+319544 317900 353
+462396 463030 307
+609742 610311 341
+608600 607137 403
+374550 374857 330
+197098 197457 267
+247929 247901 288
+80028 78065 338
+94530 95285 328
+360836 360476 291
+528303 528918 377
+593744 593488 266
+604253 604556 297
+228390 229580 355
+223884 224956 324
+579204 578245 359
+201663 199859 342
+280376 279413 345
+398235 397849 268
+394632 395674 405
+139400 140103 344
+465566 466313 307
+253038 251281 319
+667100 668472 367
+602860 601041 403
+477360 479141 382
+43586 45265 314
+332992 333872 335
+81780 81184 258
+436308 438240 387
+682962 682143 305
+562152 563922 359
+419728 418302 343
+450140 451682 387
+651276 652731 354
+699896 698979 367
+300173 300533 340
+388416 390342 436
+316745 317723 322
+698816 699101 274
+48756 50702 296
+440852 441083 325
+277534 276630 314
+257760 255880 345
+276864 276008 314
+626696 627410 310
+391143 391248 237
+157108 155139 383
+409625 411273 449
+696960 698000 318
+391853 392190 330
+567112 566941 359
+475308 475540 320
+46720 47304 283
+638163 637306 354
+677832 675992 336
+172988 174941 347
+438932 440214 356
+732795 734203 349
+506368 504971 364
+503371 504797 364
+366786 366139 317
+297817 299460 371
+332260 333200 335
+21489 21356 238
+534982 536649 333
+78758 78065 307
+612312 610356 354
+421670 422085 312
+263338 264905 332
+294318 294989 296
+14212 12349 276
+156541 155254 383
+396000 394205 405
+588033 586578 328
+736960 737505 380
+649839 650482 341
+723086 724741 362
+489995 489042 351
+596484 598063 372
+331566 329828 353
+425996 425022 356
+14421 12480 276
+361000 361374 348
+215363 214007 293
+564642 563415 315
+685937 686253 274
+209336 208883 311
+724455 724753 362
+683272 683274 261
+262314 261485 301
+275712 275568 239
+349126 347952 335
+739970 741861 393
+198147 199581 329
+666236 664559 442
+229581 227741 355
+58824 58004 273
+664175 665796 442
+439992 438501 400
+416472 417834 343
+606062 605467 310
+352887 352483 304
+574860 575058 297
+402996 404338 343
+39100 40727 306
+434565 434200 338
+595840 596442 372
+234715 236250 337
+363918 362073 361
+191241 192828 347
+55160 56588 322
+41817 40599 288
+61620 61033 286
+286342 287091 314
+533808 534676 346
+102297 104214 310
+250110 248168 350
+465870 465399 369
+757792 755820 362
+668683 668154 292
+402192 401306 299
+546516 547771 452
+381600 382211 374
+388485 388820 299
+538944 539942 346
+794970 796323 468
+603804 602126 297
+317975 316267 353
+798746 797276 344
+634302 635488 310
+70296 71511 325
+10517 12220 268
+630990 629324 341
+180042 179034 303
+495320 496548 320
+255282 256006 288
+313390 313032 340
+550940 549469 346
+716448 716699 305
+586606 586883 235
+420452 418621 343
+534807 535409 302
+734720 735395 274
+229059 230078 306
+34524 35530 311
+102052 101019 310
+304880 306093 278
+820050 821531 375
+113988 115705 349
+599575 597756 372
+820548 819209 450
+439370 439780 312
+550290 550164 240
+111354 111583 323
+713856 713681 274
+733873 733162 318
+487056 487689 320
+364060 364794 286
+677160 679092 380
+313875 313331 309
+704758 706740 380
+208911 210118 342
+806400 807232 344
+147175 145783 357
+412580 412984 343
+487254 486252 382
+182304 180503 316
+291525 292010 265
+487296 487089 320
+557326 557258 284
+742000 741720 318
+764100 763129 375
+448800 450380 369
+187220 185934 347
+110760 111512 323
+166335 166981 334
+763476 764272 318
+97470 97472 129
+529864 529390 333
+706168 706288 305
+547404 548738 377
+743894 744929 318
+107500 106528 323
+324597 325075 322
+586160 586791 359
+640346 640431 235
+112320 112273 230
+104665 103431 310
+380174 378224 361
+344199 343404 304
+362824 363582 273
+690855 692233 442
+796920 797364 344
+361465 360073 410
+789160 790181 406
+833715 835230 357
+40204 40788 257
+41125 39242 306
+155052 155507 308
+874369 876019 432
+402124 403931 343
+267216 265290 345
+638880 640765 416
+798186 799460 375
+287532 288927 389
+296688 295004 358
+472056 473487 338
+609765 611234 341
+716774 716426 336
+821362 823347 375
+679320 678162 380
+589407 590296 359
+490390 489622 307
+842886 844731 357
+198024 197463 285
+495615 497548 320
+507792 508945 364
+272975 272566 314
+326144 324903 340
+631488 630686 310
+489410 487711 382
+121365 121462 274
+237600 238093 319
+706384 704698 380
+386056 387775 330
+106554 106275 310
+374256 375667 361
+594585 595798 328
+29898 28270 272
+200447 200139 342
+286928 285140 376
+589032 587958 315
+899990 901417 401
+386264 386902 255
+472416 473253 338
+201773 203697 342
+795180 796074 331
+135420 133450 344
+544104 545091 315
+810628 808675 406
+699516 700792 367
+60654 59890 317
+861120 861658 326
+172227 173623 347
+342984 344085 335
+664560 665142 323
+680988 681062 336
+530025 530563 271
+828770 829830 375
+622017 622141 279
+455648 455852 338
+826810 827351 282
+52080 51194 309
+247646 249613 350
+589956 591175 359
+639105 639101 217
+753738 754793 318
+865810 865986 388
+846144 847253 313
+481618 480991 369
+723198 723167 212
+523023 522573 302
+639200 637424 354
+868543 869546 388
+759252 757468 362
+115046 116055 349
+53808 52781 322
+32130 30665 285
+781396 782109 362
+716879 718666 349
+128928 129157 225
+347334 345379 441
+666900 666272 323
+239652 240103 275
+315112 315951 340
+145809 144225 326
+898668 898241 295
+621705 621674 279
+516240 516414 271
+238293 239051 350
+126456 126944 331
+889952 890819 339
+216000 215928 262
+780332 778657 362
+705146 703506 504
+787734 789672 406
+854104 853035 357
+499870 500853 364
+540960 542450 364
+347153 348250 322
+862488 862763 326
+360468 359957 410
+708100 706910 349
+263141 264269 332
+898128 896462 370
+183897 183145 254
+572712 571062 372
+109200 108994 261
+223504 222859 324
+265744 264396 332
+7824 7571 221
+410201 411451 374
+87220 88752 333
+39240 39194 200
+543046 542643 271
+241818 242930 319
+84624 85387 289
+955450 954187 383
+119306 118715 318
+43428 44517 270
+955396 955644 308
+326370 328223 322
+264330 265226 332
+967216 967370 228
+450368 451492 387
+150936 150905 233
+465192 463695 338
+688540 689203 336
+923292 923624 308
+413755 414521 312
+766464 764933 331
+105894 105777 279
+674000 673407 292
View
6 pstrong-TestCollatz.out
@@ -0,0 +1,6 @@
+................
+----------------------------------------------------------------------
+Ran 16 tests in 0.002s
+
+OK
+TestCollatz.py
View
137 pstrong-TestCollatz.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python3
+
+# -------------------------------
+# projects/collatz/TestCollatz.py
+# Copyright (C) 2014
+# Paul Strong
+# -------------------------------
+
+"""
+To test the program:
+ % python TestCollatz.py > TestCollatz.out
+ % chmod ugo+x TestCollatz.py
+ % TestCollatz.py > TestCollatz.out
+"""
+
+# -------
+# imports
+# -------
+
+import io
+import unittest
+
+from Collatz import collatz_read, collatz_eval, collatz_print, collatz_solve, collatz_cycles
+
+# -----------
+# TestCollatz
+# -----------
+
+class TestCollatz (unittest.TestCase) :
+ # ----
+ # read
+ # ----
+
+ def test_read (self) :
+ r = io.StringIO("1 10\n")
+ m = collatz_read(r)
+ i, j = list(next(m))
+ self.assertTrue(i == 1)
+ self.assertTrue(j == 10)
+
+ def test_read_2 (self) :
+ r = io.StringIO("3245 1451\n")
+ m = collatz_read(r)
+ i, j = list(next(m))
+ self.assertTrue(i == 3245)
+ self.assertTrue(j == 1451)
+
+ def test_read_3 (self) :
+ r = io.StringIO("820000 999999\n")
+ m = collatz_read(r)
+ i, j = list(next(m))
+ self.assertTrue(i == 820000)
+ self.assertTrue(j == 999999)
+
+ # ----
+ # eval
+ # ----
+
+ def test_eval_1 (self) :
+ v = collatz_eval(1, 10)
+ self.assertTrue(v == 20)
+
+ def test_eval_2 (self) :
+ v = collatz_eval(100, 200)
+ self.assertTrue(v == 125)
+
+ def test_eval_3 (self) :
+ v = collatz_eval(201, 210)
+ self.assertTrue(v == 89)
+
+ def test_eval_4 (self) :
+ v = collatz_eval(900, 1000)
+ self.assertTrue(v == 174)
+
+ # -----
+ # cycles
+ # -----
+ def test_cycles_1 (self) :
+ v = collatz_cycles(4)
+ self.assertTrue(v == 3)
+
+ def test_cycles_2 (self) :
+ v = collatz_cycles(3)
+ self.assertTrue(v == 8)
+
+ def test_cycles_3 (self) :
+ v = collatz_cycles(18)
+ self.assertTrue(v == 21)
+
+ # -----
+ # print
+ # -----
+
+ def test_print (self) :
+ w = io.StringIO()
+ collatz_print(w, 1, 10, 20)
+ self.assertTrue(w.getvalue() == "1 10 20\n")
+
+ def test_print2 (self) :
+ w = io.StringIO()
+ collatz_print(w, 800000, 1000000, 45)
+ self.assertTrue(w.getvalue() == "800000 1000000 45\n")
+
+ def test_print3 (self) :
+ w = io.StringIO()
+ collatz_print(w, -5, 10, 45)
+ self.assertTrue(w.getvalue() == "-5 10 45\n")
+
+ # -----
+ # solve
+ # -----
+
+ def test_solve (self) :
+ r = io.StringIO("1 10\n100 200\n201 210\n900 1000\n")
+ w = io.StringIO()
+ collatz_solve(r, w)
+ self.assertTrue(w.getvalue() == "1 10 20\n100 200 125\n201 210 89\n900 1000 174\n")
+
+ def test_solve2 (self) :
+ r = io.StringIO("9 10\n1 20\n1 17\n")
+ w = io.StringIO()
+ collatz_solve(r, w)
+ self.assertTrue(w.getvalue() == "9 10 20\n1 20 21\n1 17 20\n")
+
+ def test_solve3 (self) :
+ r = io.StringIO("")
+ w = io.StringIO()
+ collatz_solve(r, w)
+ self.assertTrue(w.getvalue() == "")
+
+# ----
+# main
+# ----
+
+print("TestCollatz.py")
+unittest.main()
+print("Done.")
Please sign in to comment.
Something went wrong with that request. Please try again.