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 27, 2024 17:38Hal FHal FScore: 57,531Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2024 17:3854,494337,255,919267,018,58302,273,280
2Apr 27, 2024 17:3854,688349,901,163267,973,38702,277,376
3Apr 27, 2024 17:3856,465302,988,712274,675,0002,004,0002,285,568
4Apr 27, 2024 17:3856,964303,953,373278,123,0001,000,0002,527,232
5Apr 27, 2024 17:3857,045305,352,053277,517,0002,003,0002,371,584
6Apr 27, 2024 17:3857,524306,644,930279,869,0001,999,0002,285,568
7Apr 27, 2024 17:3857,531308,934,873279,903,0001,999,0002,285,568
8Apr 27, 2024 17:3857,571307,356,920279,095,0003,001,0002,285,568
9Apr 27, 2024 17:3857,792305,028,288280,182,0003,001,0002,523,136
10Apr 27, 2024 17:3858,110351,226,424284,739,34802,277,376
11Apr 27, 2024 17:3860,348319,529,789293,708,0001,998,0002,269,184
12Apr 27, 2024 17:3861,440325,172,500299,055,0002,000,0002,281,472