Format integers Sergey Svistunov

Compute a checksum over the decimal representations of binary integers as fast as possible.

Input: 250 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: A uint64 checksum computed as:

CRC = sum of number_crc(n) for each n

where number_crc(n) converts n to its decimal string and sums ascii(digit) * position over each digit (0-indexed from the left).

Example: For n = 42, the decimal string is "42", so number_crc(42) = ascii('4') * 0 + ascii('2') * 1 = 52 * 0 + 50 * 1 = 50.

Back to listApr 28, 2025 14:55etherealetherealScore: 280,364Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 28, 2025 14:55277,5211,382,030,7841,358,853,000999,0002,437,120
2Apr 28, 2025 14:55277,8671,384,448,6701,358,549,0002,999,0002,473,984
3Apr 28, 2025 14:55279,3601,394,710,4731,366,863,0001,999,0002,330,624
4Apr 28, 2025 14:55279,9511,394,821,8831,369,759,0001,999,0002,473,984
5Apr 28, 2025 14:55280,3641,395,593,1341,371,783,0001,999,0002,506,752
6Apr 28, 2025 14:55281,0521,403,623,7091,376,158,000999,0002,428,928
7Apr 28, 2025 14:55283,7591,415,412,1691,385,420,0004,997,0002,428,928
8Apr 28, 2025 14:55285,4901,422,359,4651,395,903,0002,999,0002,482,176
9Apr 28, 2025 14:55286,5691,433,121,7081,402,186,0002,000,0002,330,624