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 9, 2021 12:31Yuriy LyfenkoYuriy LyfenkoScore: 103,828Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 9, 2021 12:31103,6641,039,933,178505,954,0001,999,0002,478,080
2Jul 9, 2021 12:31103,6771,034,329,661507,019,0001,000,0002,482,176
3Jul 9, 2021 12:24103,6871,033,133,069506,066,0002,000,0002,478,080
4Jul 9, 2021 12:24103,7221,037,058,431508,238,00002,478,080
5Jul 9, 2021 12:31103,7231,036,621,869507,241,0001,000,0002,478,080
6Jul 9, 2021 12:24103,7281,037,136,766508,266,00002,478,080
7Jul 9, 2021 12:24103,7521,033,784,935508,387,00002,478,080
8Jul 9, 2021 12:28103,7611,035,259,019507,430,000998,0002,260,992
9Jul 9, 2021 12:28103,7841,034,630,056507,543,000999,0002,482,176
10Jul 9, 2021 12:28103,7901,033,656,717507,572,000999,0002,478,080
11Jul 9, 2021 12:24103,7961,034,924,470506,600,0001,998,0002,478,080
12Jul 9, 2021 12:24103,7971,033,454,637507,606,000999,0002,478,080
13Jul 9, 2021 12:28103,8021,034,978,442506,634,0001,998,0002,523,136
14Jul 9, 2021 12:24103,8091,033,733,924507,663,000999,0002,260,992
15Jul 9, 2021 12:31103,8111,040,188,755507,676,000999,0002,478,080
16Jul 9, 2021 12:28103,8171,035,600,475507,705,000999,0002,260,992
17Jul 9, 2021 12:28103,8241,035,987,693506,738,0001,998,0002,482,176
18Jul 9, 2021 12:28103,8281,035,451,500507,759,000999,0002,482,176
19Jul 9, 2021 12:24103,8281,036,112,308507,759,000999,0002,260,992
20Jul 9, 2021 12:31103,8311,035,537,255507,773,000999,0002,478,080
21Jul 9, 2021 12:31103,8311,042,919,162506,775,0001,999,0002,482,176
22Jul 9, 2021 12:28103,8391,040,533,845506,811,0001,999,0002,473,984
23Jul 9, 2021 12:31103,8401,032,104,403506,819,0001,999,0002,478,080
24Jul 9, 2021 12:31103,8541,034,843,992507,885,000999,0002,478,080
25Jul 9, 2021 12:28103,8731,034,794,821507,979,000999,0002,478,080
26Jul 9, 2021 12:24103,8781,039,273,716509,004,00002,486,272
27Jul 9, 2021 12:31103,8911,034,220,287508,066,0001,000,0002,478,080
28Jul 9, 2021 12:31120,4791,145,259,918590,345,04202,191,360
29Jul 9, 2021 12:24120,4891,147,646,811590,395,91702,203,648
30Jul 9, 2021 12:28120,4901,155,149,168590,400,47702,191,360
31Jul 9, 2021 12:24120,5211,141,553,748590,551,59902,195,456
32Jul 9, 2021 12:28120,8311,147,758,077592,072,68102,195,456
33Jul 9, 2021 12:28120,8411,159,595,264592,120,10602,211,840
34Jul 9, 2021 12:31120,8541,149,622,574592,183,43102,211,840
35Jul 9, 2021 12:31120,8641,164,561,237592,235,33002,195,456
36Jul 9, 2021 12:24120,8891,168,335,174592,357,02302,195,456