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 listJul 25, 2025 01:04zielajzielajScore: 25,648Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 25, 2025 01:0425,599154,442,836124,430,0001,003,0002,478,080
2Jul 25, 2025 01:0425,619152,371,895125,534,00002,469,888
3Jul 25, 2025 01:0425,620149,547,814123,530,0002,008,0002,330,624
4Jul 25, 2025 01:0425,647147,706,057121,679,0003,989,0002,314,240
5Jul 25, 2025 01:0425,648158,076,343124,676,000997,0002,461,696
6Jul 25, 2025 01:0425,651151,286,069125,688,00002,461,696
7Jul 25, 2025 01:0425,942152,223,453126,117,0001,000,0002,469,888
8Jul 25, 2025 01:0426,223155,808,984127,490,0001,003,0002,301,952
9Jul 25, 2025 01:0427,899160,115,076135,709,000997,0002,334,720