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 listJun 12, 2024 07:54matsuoka-601matsuoka-601Score: 61,497Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2024 07:5560,292321,571,458293,430,0002,002,0002,285,568
2Jun 12, 2024 07:5460,314327,044,026293,535,0002,003,0002,416,640
3Jun 12, 2024 07:5560,333318,750,298292,636,0002,996,0002,277,376
4Jun 12, 2024 07:5560,342324,252,775293,677,0001,997,0002,433,024
5Jun 12, 2024 07:5560,348321,687,419293,706,0001,998,0002,281,472
6Jun 12, 2024 07:5460,664319,391,544295,254,0002,001,0002,416,640
7Jun 12, 2024 07:5561,124330,808,607297,507,0002,003,0002,420,736
8Jun 12, 2024 07:5561,167325,734,506296,722,0002,997,0002,408,448
9Jun 12, 2024 07:5461,173323,455,348297,752,0001,998,0002,424,832
10Jun 12, 2024 07:5461,224326,854,343296,999,0002,999,0002,416,640
11Jun 12, 2024 07:5461,236323,276,706298,058,0002,000,0002,523,136
12Jun 12, 2024 07:5561,424323,319,511297,981,0002,999,0002,424,832
13Jun 12, 2024 07:5461,497361,197,068301,335,58502,277,376
14Jun 12, 2024 07:5461,516360,420,796301,426,53002,269,184
15Jun 12, 2024 07:5561,535366,240,425301,523,09702,260,992
16Jun 12, 2024 07:5561,556357,631,279301,624,26102,265,088
17Jun 12, 2024 07:5561,588360,381,982301,781,90302,281,472
18Jun 12, 2024 07:5462,011331,912,178300,857,0002,998,0002,285,568
19Jun 12, 2024 07:5562,058332,395,014301,084,0003,000,0002,285,568
20Jun 12, 2024 07:5463,361373,370,962310,470,94902,265,088
21Jun 12, 2024 07:5463,376337,136,139308,537,0002,003,0002,285,568
22Jun 12, 2024 07:5466,935350,286,821324,983,0002,999,0002,424,832
23Jun 12, 2024 07:5473,357385,374,515358,449,000998,0002,416,640
24Jun 12, 2024 07:5578,723409,827,349382,747,0002,998,0002,424,832