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 15, 2024 05:22matsuoka-601matsuoka-601Score: 52,988Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2024 05:2252,188319,400,011255,723,50502,236,416
2Jun 15, 2024 05:2252,203327,573,442255,792,76002,244,608
3Jun 15, 2024 05:2152,317324,831,500256,354,37202,240,512
4Jun 15, 2024 05:2252,328320,860,257256,407,77402,228,224
5Jun 15, 2024 05:2152,830338,757,677258,867,82402,232,320
6Jun 15, 2024 05:2152,953291,880,317259,471,00002,289,664
7Jun 15, 2024 05:2252,962291,101,655257,510,0002,003,0002,510,848
8Jun 15, 2024 05:2252,963290,315,136257,514,0002,004,0002,289,664
9Jun 15, 2024 05:2252,966286,014,076257,528,0002,004,0002,498,560
10Jun 15, 2024 05:2152,968286,515,075257,537,0002,004,0002,502,656
11Jun 15, 2024 05:2152,972294,583,514257,561,0002,004,0002,498,560
12Jun 15, 2024 05:2252,982286,495,288256,617,0002,995,0002,490,368
13Jun 15, 2024 05:2152,988290,239,907256,646,0002,995,0002,502,656
14Jun 15, 2024 05:2153,022286,470,353256,812,0002,997,0002,494,464
15Jun 15, 2024 05:2153,030290,735,885256,848,0002,998,0002,494,464
16Jun 15, 2024 05:2153,092282,552,587258,148,0002,001,0002,490,368
17Jun 15, 2024 05:2153,302283,571,674258,180,0003,002,0002,289,664
18Jun 15, 2024 05:2253,411293,404,779258,719,0002,996,0002,277,376
19Jun 15, 2024 05:2253,700289,391,207260,128,0003,001,0002,281,472
20Jun 15, 2024 05:2253,901284,396,587261,116,0003,001,0002,289,664
21Jun 15, 2024 05:2154,043320,608,490264,809,10502,248,704
22Jun 15, 2024 05:2254,105288,608,314262,114,0003,001,0002,310,144
23Jun 15, 2024 05:2254,280295,018,694263,971,0001,999,0002,502,656
24Jun 15, 2024 05:2154,287293,306,979263,005,0003,000,0002,519,040