Skip to content
the program

INTCALC

Staging stand-in: INTCALC.

Program
intcalc
Source hash
sha256:89c750ad05fa38c7de9488cd03dab8281098f634a9f51612680a62556b629e0d
Inputs
ACCT-ID, ANNUAL-RATE, BALANCE, DAY-COUNT
Outputs
ACCRUED, DAILY-INT
Public tests
354 inputs with the COBOL's answers, below
Secret tests
481 inputs nobody has seen, fixed by hash, published at the close
Engine
0.7.0
Compiler
GnuCOBOL 3.2. Flags and the exact command: placeholder for the founder (pin and publish them).

The source.

Read it. Every number and string your entry uses must appear here, or be 0, 1, −1, a power of ten or a field name.

      *****************************************************************      * INTCALC - DAILY INTEREST ACCRUAL                              *      *                                                               *      * For one account: daily interest on the balance at the given   *      * annual rate (actual/365), rounded to the penny, then the      *      * interest accrued over the given number of days.               *      *                                                               *      * Fool the Replay challenge program 1. The trap is ROUNDED:     *      * COBOL rounds a half penny away from zero; a migration that    *      * rounds half to even drifts by a penny on exact ties only.     *      *****************************************************************       IDENTIFICATION DIVISION.       PROGRAM-ID. INTCALC.      *       DATA DIVISION.       WORKING-STORAGE SECTION.       01  WS-WORK-FIELDS.           05  WS-DAYS-IN-YEAR     PIC 9(3)        VALUE 365.           05  WS-DAILY-INT        PIC S9(7)V99    COMP-3 VALUE ZERO.      *       LINKAGE SECTION.       01  LK-ACCRUAL.           05  LK-ACCT-ID          PIC X(10).           05  LK-BALANCE          PIC S9(9)V99    COMP-3.           05  LK-ANNUAL-RATE      PIC 9V9(5).           05  LK-DAY-COUNT        PIC 9(3).           05  LK-DAILY-INT        PIC S9(7)V99    COMP-3.           05  LK-ACCRUED          PIC S9(9)V99    COMP-3.      *       PROCEDURE DIVISION USING LK-ACCRUAL.      *       0000-MAIN.           COMPUTE WS-DAILY-INT ROUNDED =               LK-BALANCE * LK-ANNUAL-RATE / WS-DAYS-IN-YEAR           MOVE WS-DAILY-INT TO LK-DAILY-INT           COMPUTE LK-ACCRUED = WS-DAILY-INT * LK-DAY-COUNT           GOBACK.

Raw file: https://staging-challenge-api.montoralabs.com/challenge/program

The public tests.

354 inputs with the COBOL's answer for each, so you can test locally. Your entry runs on all of them, and a difference is shown with the input and both answers.

#ACCT-IDANNUAL-RATEBALANCEDAY-COUNTACCRUED (COBOL)DAILY-INT (COBOL)
0001T0ERJ0Q1GI0.00000-999999999.993650.000.00
000233449728919.99999-999999999.99999-389835647.12-7397232.88
00036GG01IQCBF0.00000329698743.003650.000.00
000423571556165.41206674419721.559990.000.00
000525821904965.47500-999999999.99365-825000000.00-5000000.00
000653229479065.41206-674419721.879990.000.00
000718555585765.00000730000000.0100.000.00
000816301647325.00000730000000.019990.000.00
000989718284645.47500329698743.0000.004945481.15
00105JNPLAW7JN5.41206-674419721.909990.000.00
001157278689095.41206-674419721.889990.000.00
0012VWKPMUI16V5.00000-730000000.009990.000.00
Show the other 342 inputs
#ACCT-IDANNUAL-RATEBALANCEDAY-COUNTACCRUED (COBOL)DAILY-INT (COBOL)
0013UM7HM8RK545.00000-730000000.0000.000.00
001442341922125.47500329698743.00999940535668.854945481.15
001516914154745.00000-793457031.25373-324239351.20-869274.40
0016AZ5P6R67M59.99998-999998861.6759-436433283.11-7397174.29
001728148355060.00000364.996250.000.00
001869769965240.00000-61035156.245000.000.00
001973387345321.00001-670131363.1400.00-1835994.70
002027594784279.99999-999999999.99367-714784466.96-7397232.88
002135294654779.99998999999999.99364692582794.727397205.48
002208288895079.99999999999999.99171264926822.487397232.88
002390155105230.00001373020847.1400.0010.22
002475220971289.999990.0000.000.00
002514982664400.0000122598401.0031.860.62
002693948945520.00000367.152960.000.00
002748992150781.000000.0110.000.00
0028B2ZHPPTX8Z3.000008211.7599266950.0867.49
002930260013600.03578329698743.0036511796621.1532319.51
003037057983810.00000365.01600.000.00
003160997215099.0000011.33364101.920.28
0032CO4VFFN9X30.6810462.2936543.800.12
003302582267350.000010.00530.000.00
003428123497046.00000364.9900.006.00
003518708907500.000010.009990.000.00
003695419199331.0000099.0010.270.27
003763909933880.00012317.00180.000.00
0038B56JJC99BP0.00021-83.431490.000.00
003909043867869.99999999999999.98171264926822.487397232.88
004017740574720.00347214989529.0012043.872043.87
004198186814033.000006378550.97331730072.8552426.45
004232060890840.000000.0010.000.00
0043UDK25MMYHC0.000000.013650.000.00
00445DOXGNJOPT6.000000.0000.000.00
004544435954050.00000270.00210.000.00
004620425854900.00000-992105839.003650.000.00
004727836369560.00000160.0000.000.00
004867028851990.00001184988353.003811931.675.07
0049KF0DUS3SHQ0.000000.0000.000.00
005060743332050.00000330.001350.000.00
0051YQR19KMERP3.00000999999999.9800.008219178.08
0052IGGXJ5WZOW0.00027-999999999.99542-400933.66-739.73
00533H8XX5BUP99.99999999999999.9999732326055.127397232.88
0054U87K8TDSON0.06848-999999999.96371-69605699.24-187616.44
005539448709509.99999-0.01540.000.00
0056QAKWRZ4VRY0.00001758220.573046.080.02
005700599753214.00000100.45125137.501.10
00585ZUJWLKUCK9.99998268.483652686.407.36
005985423145310.00001364.993660.000.00
006075667745860.00000-989605807.071440.000.00
006195502489689.9999963.90364637.001.75
006202453693580.00675214.0010.000.00
00633QXXZQ6FTM9.99999364.993663660.0010.00
00648VRZCCZSP61.000005000.00113.7013.70
006538948638720.0000191.2910.000.00
006691243877630.036110.004720.000.00
006772764595019.99999-999999999.99366-707387234.08-7397232.88
006813951056840.0000126812876.2796.570.73
006991544672301.000005000.00113.7013.70
007048965817652.00000-64382485.00731-257882720.94-352780.74
00718C5JMF7N6I1.00000-0.0120.000.00
007284524899662.00000-318573543.00999-743862841.55-1745608.45
007335306206600.00014-4.444370.000.00
0074G6WQCSTMEC7.00000-999999999.9823-211095890.37-9178082.19
007592381624690.00007365.459990.000.00
007610679099690.00150-881115901.0000.00-3621.02
007797ONT8BMCO9.9999980.1212.202.20
007838319663090.000000.072860.000.00
0079ZOXXMF6L429.99999999999999.99999389835647.127397232.88
008024815899209.99999999999999.9941999440576.727397232.88
008174064737850.00000125.005920.000.00
00828MXIDN78667.18750549316406.2500.00817018.27
008325149714399.99998-2281250.00561-35062432.68-62499.88
008407795888570.29200-915527343.75365-267333986.20-732421.88
008583642799760.000012737500.0099979.920.08
008610661395783.67905-992105839.00365-6986.10-19.14
008739712756403.796006.2536525.550.07
008883095828600.62754-273750.0000.00-470.66
008983MLINP0VT0.04740-63875.00999-8291.70-8.30
009040939118775.41206-674419721.8800.000.00
009171088386149.99500365.003663660.0010.00
009239351192841.82500-880069697.00367-614927895.83-4400348.49
009355664074580.000013102500.001019.090.09
0094O5KOEL7KXY9.99999-3102500.00369-31364970.48-84999.92
009532164366649.95500365.003663645.369.96
0096JC443M3TRY9.99999-2372500.00174-11309989.56-64999.94
0097CWOXZ2ZTMJ0.0000126097500.0096.480.72
009807171607515.41206674419721.5500.000.00
0099SLFZZW0N6N0.103312372500.00364244433.28671.52
010056769297779.99999-2737500.00574-43049959.82-74999.93
0101E4P8B11JXW1.22640281.25617586.150.95
010257322793175.41206-674419721.8700.000.00
010359532006539.999992372500.00543509996.7664999.94
010419362518180.000012372500.0036625.620.07
0105YPRYFRKF0B9.999982463750.0036524637452.5567499.87
010670646317740.00001-247652500.0000.00-6.79
010771074210232.34476732421875.0000.004705078.13
010849778397769.99999-3102500.00250-21249980.00-84999.92
010936516271842.2460310402500.0036523364328.9064011.86
011017921284830.39128610351562.5063925781.28654296.88
011181081738725.41206-674419721.9000.000.00
011227072199667.81250321.2018123.846.88
0113WPEX9CKMI43.10104708007812.5067666298440.886015234.38
011452367933870.3095273242187.5012745312.5662109.38
0115S6IJQYFYZP4.59024-793457031.25372-712007814.36-9978515.63
011688958290065.00000729999999.62567669999994.339999999.99
011792037169370.4088061035156.2536625019533.0868359.38
011883681066840.36500943517035.006359441573.52943517.04
011910229912865.00000730000000.015670.000.00
012097939163939.12500329698743.003658501031.708242468.58
012156112323190.627543741250.0000.006432.29
012279174121540.10331-2737500.00364-282038.12-774.83
0123WQO0K0M57C0.36500943517035.00200188703408.00943517.04
012436610079620.3212073242187.5012773437.5664453.13
012505457241999.99500365.0000.0010.00
0126LCZRBE3XBF2.35644732421875.0000.004728515.63
012779362954274.964006.2536532.850.09
012836767410613.65000999999999.9800.000.00
0129R90C22I1WO5.00000729999999.645670.000.00
013027846209953.3288093.75744639.840.86
0131ZOIAUV7F7F0.62754-3741250.0000.00-6432.29
013213716095205.41206674419721.5300.009999999.99
013373878706880.4964062.5036532.850.09
013416358257350.0408873242187.501298437.568203.13
013546495908781.10960281.25617530.620.86
013637426710451.1862520.0030821.560.07
013729785221467.81250321.203652511.206.88
013863939815197.04304-427246093.75437-602689455.31-8244140.63
0139CCHCS66POH3.28500-830383595.00325-428872017.00-7473452.36
014007763274597.81250332.8818128.347.13
014124630714241.82500-621137567.007-21739814.88-3105687.84
0142NXW8BFC5VS3.15944708007812.50676142876565.886128515.63
0143FXH4OR4VMW1.82500160008947.0000.00800044.74
014482976795790.50224476074218.75200131015626.00655078.13
014528104062994.56688-793457031.25372-693117189.36-9927734.38
014675543157899.12500329698743.003658501031.708242468.58
01479SMMUPM3HR2.30004-999780625.00353-223934265.71-6300097.07
014890675352787.81250309.5218119.346.63
01493XAYNLHHJ22.30004-999598125.00353-223528308.65-6298947.05
0150NCMMLX2XNU4.56250-700245198.00999-744311915.02-8753064.98
015173198404327.81250344.5618132.847.38
0152A52Z9QJGXU7.81250344.563652693.707.38
01532ZQ0XYNIMW0.0067536500.0010.680.68
015449848711887.81250297.843652328.706.38
015512503511850.103312737500.00364282038.12774.83
015648063295363.11272708007812.5067681614065.886037890.63
0157OI2W7O0G5R3.95952573730468.75185151408204.056223828.13
0158IYWRIPEPXC0.10331-182500.00364-18804.24-51.66
015968573836049.21552-305175781.25250-926269532.50-7705078.13
016064362865585.00000-729999999.985670.000.00
016161524944510.00021-1642500.00149-141.55-0.95
016255476556855.00000-730000000.005670.000.00
016390618487647.81250309.523652419.956.63
0164XIPZJT7VE85.00000729999999.995670.000.00
01652WH0QDFHYY5.41206674419721.8900.000.00
016686643282345.00000730000000.005670.000.00
016784765588845.00000729999999.655670.000.00
016810ZUMG8PH85.00000-730000000.015670.000.00
016991HT0YA0525.41206674419721.8700.000.00
01709BQTBW5O2Z2.30004-999415625.00353-223122351.59-6297797.03
017171575407193.65000999999999.9900.000.00
017258310240285.00000730000000.025670.000.00
017369441021455.00000-729999999.995670.000.00
01748BEOP0M9TS5.00000729999999.63567669999994.339999999.99
017559308092305.41206674419721.5400.009999999.99
01768OUE0MQWP35.41206674419721.9000.000.00
017786870413085.41206-674419721.8900.000.00
017890840567800.00000-999999999.993650.000.00
017992635152489.99999-999999999.99999-389835647.12-7397232.88
01808WAU68CWKF0.00000329698743.003650.000.00
018157423929585.41206674419721.559990.000.00
01824FZIWC2SQC5.47500-999999999.99365-825000000.00-5000000.00
018354789505945.41206-674419721.879990.000.00
018482909752605.00000730000000.0100.000.00
018576370399925.00000730000000.019990.000.00
0186CGDKTUWSNI5.47500329698743.0000.004945481.15
018725898127385.41206-674419721.909990.000.00
018894187026775.41206-674419721.889990.000.00
018942345877635.00000-730000000.009990.000.00
019001301221915.00000-730000000.0000.000.00
019148749914445.47500329698743.00999940535668.854945481.15
019225179452635.00000-793457031.25373-324239351.20-869274.40
019330051868369.99998-999998861.6759-436433283.11-7397174.29
019487386010110.00000364.996250.000.00
019532170195880.00000-61035156.245000.000.00
019634533085301.00001-670131363.1400.00-1835994.70
0197F1MAJ76MK09.99999-999999999.99367-714784466.96-7397232.88
0198MOSKNGG76A9.99998999999999.99364692582794.727397205.48
019973324208689.99999999999999.99171264926822.487397232.88
020035QW7IVDSP0.00001373020847.1400.0010.22
020198988712979.999990.0000.000.00
020275445286350.0000122598401.0031.860.62
020386096828030.00000367.152960.000.00
0204E7KENA8ZVY1.000000.0110.000.00
0205W46RR0HHB43.000008211.7599266950.0867.49
020691103543910.03578329698743.0036511796621.1532319.51
020787334088420.00000365.01600.000.00
020847946033799.0000011.33364101.920.28
020918661539760.6810462.2936543.800.12
021012959741300.000010.00530.000.00
021130208831836.00000364.9900.006.00
021282873811980.000010.009990.000.00
021376648830771.0000099.0010.270.27
021451600337720.00012317.00180.000.00
021566107452760.00021-83.431490.000.00
021689784485039.99999999999999.98171264926822.487397232.88
0217RMAJRLR99N0.00347214989529.0012043.872043.87
02189SOVNAMHSP3.000006378550.97331730072.8552426.45
0219A6L6A7C18G0.000000.0010.000.00
022011934931510.000000.013650.000.00
022199763228726.000000.0000.000.00
022241598798950.00000270.00210.000.00
0223IREMPRM6WX0.00000-992105839.003650.000.00
022462460729330.00000160.0000.000.00
022579364227380.00001184988353.003811931.675.07
022691079313180.000000.0000.000.00
022784689252960.00000330.001350.000.00
0228EBK1SSK5MM3.00000999999999.9800.008219178.08
022902114178570.00027-999999999.99542-400933.66-739.73
02307V0FH91N7X9.99999999999999.9999732326055.127397232.88
0231FNVB78EO420.06848-999999999.96371-69605699.24-187616.44
0232O1J60VITOF9.99999-0.01540.000.00
023392886986900.00001758220.573046.080.02
023457499816234.00000100.45125137.501.10
023548880238209.99998268.483652686.407.36
023694H5OFUOBM0.00001364.993660.000.00
0237G9JGZJ889J0.00000-989605807.071440.000.00
0238AJ2Z6HFIZ79.9999963.90364637.001.75
0239UO6IXREJP50.00675214.0010.000.00
024009453414339.99999364.993663660.0010.00
0241406M8O72MN1.000005000.00113.7013.70
0242OG2YPCVFFK0.0000191.2910.000.00
024336945133570.036110.004720.000.00
024421287902309.99999-999999999.99366-707387234.08-7397232.88
02451E2N9DK0MK0.0000126812876.2796.570.73
0246H4P13J98UL1.000005000.00113.7013.70
0247QEOQ44QCRT2.00000-64382485.00731-257882720.94-352780.74
024854696033831.00000-0.0120.000.00
0249IFK42X8XR22.00000-318573543.00999-743862841.55-1745608.45
0250Q4WV5BHAH50.00014-4.444370.000.00
025169559680127.00000-999999999.9823-211095890.37-9178082.19
025294936458990.00007365.459990.000.00
0253UVSPOZ0POI0.00150-881115901.0000.00-3621.02
025450609424959.9999980.1212.202.20
0255UGQRPOHCJI0.000000.072860.000.00
025603287158879.99999999999999.99999389835647.127397232.88
025784649461379.99999999999999.9941999440576.727397232.88
025811876710320.00000125.005920.000.00
025903600843177.18750549316406.2500.00817018.27
0260WDBM417MJU9.99998-2281250.00561-35062432.68-62499.88
02618ZDEW2X7R30.29200-915527343.75365-267333986.20-732421.88
026232058133600.000012737500.0099979.920.08
026376089418633.67905-992105839.00365-6986.10-19.14
026464538857273.796006.2536525.550.07
0265NNPPQ0KPJL0.62754-273750.0000.00-470.66
026686820528020.04740-63875.00999-8291.70-8.30
026783853066785.41206-674419721.8800.000.00
026834531432159.99500365.003663660.0010.00
02694DY9FWVM3O1.82500-880069697.00367-614927895.83-4400348.49
027056162395700.000013102500.001019.090.09
027136459621099.99999-3102500.00369-31364970.48-84999.92
0272MQMSPK3UNL9.95500365.003663645.369.96
027344912812929.99999-2372500.00174-11309989.56-64999.94
0274BAPFSBCTGZ0.0000126097500.0096.480.72
027581V418K9P05.41206674419721.5500.000.00
027691435004200.103312372500.00364244433.28671.52
02778L2U35Y96D9.99999-2737500.00574-43049959.82-74999.93
02782J47HX40AH1.22640281.25617586.150.95
027953145901205.41206-674419721.8700.000.00
028013581465049.999992372500.00543509996.7664999.94
028138396808410.000012372500.0036625.620.07
028232459989159.999982463750.0036524637452.5567499.87
028379748253010.00001-247652500.0000.00-6.79
028479191643092.34476732421875.0000.004705078.13
028521862690429.99999-3102500.00250-21249980.00-84999.92
028673858613662.2460310402500.0036523364328.9064011.86
028714223036890.39128610351562.5063925781.28654296.88
028805301460965.41206-674419721.9000.000.00
028990334600457.81250321.2018123.846.88
029029119106793.10104708007812.5067666298440.886015234.38
029119780251160.3095273242187.5012745312.5662109.38
029288408645004.59024-793457031.25372-712007814.36-9978515.63
02937NEIVE0STQ5.00000729999999.62567669999994.339999999.99
029438507045500.4088061035156.2536625019533.0868359.38
029580847753960.36500943517035.006359441573.52943517.04
029681142076165.00000730000000.015670.000.00
029766Z7RNHH2H9.12500329698743.003658501031.708242468.58
029898499306490.627543741250.0000.006432.29
0299TKDLQEJ51Y0.10331-2737500.00364-282038.12-774.83
030056952999860.36500943517035.00200188703408.00943517.04
030133078332700.3212073242187.5012773437.5664453.13
030238633161929.99500365.0000.0010.00
030348327133732.35644732421875.0000.004728515.63
0304H2YJT0M59U4.964006.2536532.850.09
030553633000883.65000999999999.9800.000.00
030687299634125.00000729999999.645670.000.00
0307I4A1KF98673.3288093.75744639.840.86
030846697997040.62754-3741250.0000.00-6432.29
030943735041005.41206674419721.5300.009999999.99
03100SZNPLJEQO0.4964062.5036532.850.09
031101221764640.0408873242187.501298437.568203.13
031222805671921.10960281.25617530.620.86
031396817076221.1862520.0030821.560.07
031426034406047.81250321.203652511.206.88
031521627426057.04304-427246093.75437-602689455.31-8244140.63
0316H9PK0EGCEG3.28500-830383595.00325-428872017.00-7473452.36
03179QAF7NQ7HO7.81250332.8818128.347.13
031875019521221.82500-621137567.007-21739814.88-3105687.84
031931129019973.15944708007812.50676142876565.886128515.63
0320ZHNPM5XI6R1.82500160008947.0000.00800044.74
0321OB5ARRKLSA0.50224476074218.75200131015626.00655078.13
032280356494044.56688-793457031.25372-693117189.36-9927734.38
032306327059759.12500329698743.003658501031.708242468.58
032463010040792.30004-999780625.00353-223934265.71-6300097.07
032588533182327.81250309.5218119.346.63
032645818126442.30004-999598125.00353-223528308.65-6298947.05
0327L4Y6JVJ3SH4.56250-700245198.00999-744311915.02-8753064.98
032835894920267.81250344.5618132.847.38
032936812259287.81250344.563652693.707.38
0330KHIEG96ZFI0.0067536500.0010.680.68
0331Z6WLFIMRK77.81250297.843652328.706.38
03327WGIKUD6C20.103312737500.00364282038.12774.83
0333GJYEL86HCC3.11272708007812.5067681614065.886037890.63
03345L1JZXKBHT3.95952573730468.75185151408204.056223828.13
0335OGOH69K4490.10331-182500.00364-18804.24-51.66
033615834841689.21552-305175781.25250-926269532.50-7705078.13
033764288757775.00000-729999999.985670.000.00
03388CG8BSK7Q00.00021-1642500.00149-141.55-0.95
033984300557785.00000-730000000.005670.000.00
0340OKZSE8XNVU7.81250309.523652419.956.63
034101102771965.00000729999999.995670.000.00
0342PSH01VDPG05.41206674419721.8900.000.00
034306749586495.00000730000000.005670.000.00
03442J16WJFSQH5.00000729999999.655670.000.00
034546646194645.00000-730000000.015670.000.00
034681873983435.41206674419721.8700.000.00
03474VF1G5T0J72.30004-999415625.00353-223122351.59-6297797.03
034849263900483.65000999999999.9900.000.00
034913599250625.00000730000000.025670.000.00
035087095013955.00000-729999999.995670.000.00
0351DUU6YN1ZKE5.00000729999999.63567669999994.339999999.99
035281096064615.41206674419721.5400.009999999.99
035308876012015.41206674419721.9000.000.00
035475560741545.41206-674419721.8900.000.00

Full recording as JSON: https://staging-challenge-api.montoralabs.com/challenge/public-set

The commitment.

Before the first entry we fixed the hidden inputs and published a hash of them. At the close we publish the inputs and the seed. Anyone can then check that the hash matches, so we could not have changed the inputs after seeing an entry.

How commit-reveal works. The secret tests are generated from a secret seed. We compute a hash over the inputs in a fixed canonical form, and a second hash over the seed with a nonce. Both hashes are signed with the challenge key and published here. A hash cannot be run backwards, so the inputs stay hidden; but once the seed and inputs are revealed, anyone can recompute both hashes and compare.

A failure on the secret tests is shown as "failed a secret test" and nothing more: no input, no count, no field, until the challenge closes and the secret tests are published.

Secret tests hash
sha256:d605578d82fb2ac0f8db39aa562caae849bde159e89e91a55c63f9c99bbb253e
Seed commitment
sha256:e7338ac476aff28b334817b8350a4fe20a81aafd792e7dea1487b64d0569f172
Reference digest
sha256:8939fce049f80eae2bf24a3db6470302e395673698940f7ada700c504f17ca60
Commitment digest
sha256:aeab1c93c7b2a339da622719e859eb65b88578f142531a175535f74b557513fa
Signed
Yes, with the challenge key.
Committed
—
Reveal
After the close, once claims close on 17 Nov 2026, 18:00 UTC.

Signed commitment as JSON: https://staging-challenge-api.montoralabs.com/challenge/commitment

Verification keys.

Every result and the commitment are signed with the challenge key, which is separate from the product's key. Check any signed result against these.

Key idPurposeAlgorithmPublic key
ed25519-19b8558c3d8f3f76challenge—

As JSON: https://staging-challenge-api.montoralabs.com/challenge/keys. A verifier that checks the signature and recomputes your file’s hash ships with the engine; an in-browser one is planned.