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 listJan 10, 2025 15:24Advait IyerAdvait IyerScore: 1,017,860Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 10, 2025 15:241,015,7135,012,531,1654,975,996,000999,0002,285,568
2Jan 10, 2025 15:241,016,6005,010,529,6534,978,340,0002,998,0002,510,848
3Jan 10, 2025 15:241,016,6055,012,999,9134,979,366,0001,998,0002,285,568
4Jan 10, 2025 15:241,017,5805,015,377,6574,983,146,0002,998,0002,285,568
5Jan 10, 2025 15:241,017,8605,016,565,5674,986,514,000999,0002,281,472
6Jan 10, 2025 15:241,018,7555,023,613,9984,988,902,0002,998,0002,285,568
7Jan 10, 2025 15:241,018,8565,025,157,0464,989,395,0002,998,0002,285,568
8Jan 10, 2025 15:241,019,0035,027,611,7544,990,118,0002,998,0002,506,752
9Jan 10, 2025 15:241,019,0195,020,427,8164,990,193,0002,998,0002,510,848