156 Luhn Algorithm

Back to Problem Solutions forum

Mister_Ed     2016-02-19 21:28:32

Could there be any formatting problem? I can't find a difference between my program's solution (ca001.out) and the official solution (ca001.ref). But even "fc" says, there is a difference. A bit of help would be appreciated. Thank you

***** CA001.out
1:  9658682761027441 9816758012654925 1738885165962839 5414260473415254 3858644345893432 8453651050069710 6171516125344734 45016287
2:  13365769 6554571272849909 0732242929718404 7203206405250328 7859150374913382 6431819249582296 8905288228318523 9423949413339266
***** CA001.REF
1:  9658682761027441 9816758012654925 1738885165962839 5414260473415254 3858640345893432 8453651050069710 6171516125344734 45016287
2:  13365769 6554571272849909 0732242929718404 7203206405250328 7859150374913382 6431819249582296 8905288228318523 9423949413339266
*****

***** CA001.out
3:   7959639600933197 2016517716663001 1304928094188284 8431335647011701 2208275901078489 5133937422724080 5694260403140809 5155924
4:  250441899 9495837504677384 9034962085004366 5484340093718883 8530368188587226 8925035761829051 5910095477316481 823243643597317
5:  6 6434101657285887 8145317324724480 5771253867541253 2164873561114370 7138189320722862 3155208686889383 3841558210340232 923726
***** CA001.REF
3:   7959639600933197 2016517716663001 1304928094188284 8431335647011701 2208275901078489 5133937422724080 5694260403140809 5155924
4:  250441899 9495837504677384 9034962085004366 5444340093718883 8530364188587226 8925035761829051 5910095477316481 823243643597317
5:  6 6434101657285887 8145317324724480 5771253867541253 2164873561114370 7138189320722862 3155208686889383 3841558210340232 923726
*****
Quandray     2016-02-20 07:52:47
User avatar

Hi,

There are differences in line 1 and line 4. In line 1 there's 3858644345893432 and 3858640345893432. In line 4 it's the number starting with 853036.

Mister_Ed     2016-02-21 12:07:58

Thank you very much!

Please login and solve 5 problems to be able to post at forum