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 listMay 19, 2021 19:28Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Apr 20, 2026 23:42zielaj10.00RecheckSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 23:4201,155,450,80511,131,0003,035,0002,506,752expected "560375533401 ", got "-1209176517 "
2Apr 20, 2026 23:4201,146,610,65711,135,0003,036,0002,502,656expected "560384173599 ", got "1045951595 "
3Apr 20, 2026 23:420269,509,51612,258,0002,043,0002,506,752expected "560372616554 ", got "-94361871 "
4May 19, 2021 19:282,9871,979,752,25714,635,08402,252,800
5May 19, 2021 19:282,996331,734,32214,678,94202,248,704
6May 19, 2021 19:283,005210,987,17114,722,35702,252,800
7May 19, 2021 19:293,0081,394,429,95314,738,20602,244,608
8May 19, 2021 19:293,0161,238,267,42914,776,67302,248,704
9May 19, 2021 19:293,034142,243,35614,864,26402,252,800