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 listSep 24, 2026 14:38Andrew EpsteinAndrew EpsteinScore: 303,586Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 24, 2026 14:38302,0481,490,909,6071,477,698,0002,341,0002,117,632stderr
2Sep 24, 2026 14:38303,1891,496,299,8171,483,427,0002,203,0002,117,632stderr
3Sep 24, 2026 14:38303,4481,497,636,4881,485,781,0001,115,0002,117,632stderr
4Sep 24, 2026 14:38303,4781,497,537,5681,485,937,0001,106,0002,117,632stderr
5Sep 24, 2026 14:38303,5861,498,083,0971,486,460,0001,114,0002,117,632stderr
6Sep 24, 2026 14:38303,6541,499,210,6321,486,795,0001,113,0002,117,632stderr
7Sep 24, 2026 14:38303,9621,500,660,2651,488,301,0001,116,0002,117,632stderr
8Sep 24, 2026 14:38306,6271,512,907,8471,501,358,0001,116,0002,117,632stderr
9Sep 24, 2026 14:38311,0471,534,643,1161,523,039,0001,094,0002,117,632stderr