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 23, 2022 09:02Robert BurkeRobert BurkeScore: 64,627Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 23, 2022 09:0263,401372,898,265310,664,60402,183,168
2Jul 23, 2022 09:0263,412370,035,141310,720,21902,174,976
3Jul 23, 2022 09:0263,416377,821,114310,740,02602,183,168
4Jul 23, 2022 09:0163,420372,871,674310,757,16702,256,896
5Jul 23, 2022 09:0263,431388,946,462310,809,66102,183,168
6Jul 23, 2022 09:0163,441374,886,915310,862,02202,183,168
7Jul 23, 2022 09:0163,443375,150,594310,868,78102,187,264
8Jul 23, 2022 09:0263,465389,818,860310,976,45202,183,168
9Jul 23, 2022 09:0263,481382,079,025311,056,99802,179,072
10Jul 23, 2022 09:0264,560340,211,742315,343,0001,001,0002,269,184
11Jul 23, 2022 09:0264,575345,321,695315,415,0001,001,0002,281,472
12Jul 23, 2022 09:0264,578348,080,546315,433,0001,001,0002,535,424
13Jul 23, 2022 09:0164,580339,919,493315,439,0001,001,0002,449,408
14Jul 23, 2022 09:0264,582343,960,798315,453,0001,001,0002,441,216
15Jul 23, 2022 09:0164,588346,182,322315,482,0001,001,0002,437,120
16Jul 23, 2022 09:0264,589343,922,045315,485,0001,001,0002,531,328
17Jul 23, 2022 09:0264,590349,698,011315,488,0001,001,0002,281,472
18Jul 23, 2022 09:0264,615342,859,978315,614,000998,0002,281,472
19Jul 23, 2022 09:0164,627342,984,153314,673,0001,997,0002,281,472
20Jul 23, 2022 09:0264,634337,633,835314,710,0001,998,0002,273,280
21Jul 23, 2022 09:0264,636339,212,339315,715,0001,002,0002,281,472
22Jul 23, 2022 09:0164,636337,689,650314,717,0001,998,0002,281,472
23Jul 23, 2022 09:0164,644336,458,754314,758,0001,998,0002,281,472
24Jul 23, 2022 09:0264,645340,353,684314,763,0001,998,0002,445,312
25Jul 23, 2022 09:0264,653335,142,879314,803,0001,998,0002,281,472
26Jul 23, 2022 09:0264,664347,488,067314,855,0001,999,0002,281,472
27Jul 23, 2022 09:0264,672338,874,825314,896,0001,999,0002,281,472
28Jul 23, 2022 09:0264,678339,612,935314,923,0001,999,0002,441,216
29Jul 23, 2022 09:0264,686342,878,489314,964,0001,999,0002,457,600
30Jul 23, 2022 09:0164,698342,512,773315,022,0002,000,0002,445,312
31Jul 23, 2022 09:0164,762342,160,758316,331,0001,001,0002,281,472
32Jul 23, 2022 09:0264,833342,851,109315,685,0001,998,0002,281,472
33Jul 23, 2022 09:0164,955339,776,811317,278,0001,000,0002,449,408
34Jul 23, 2022 09:0265,071344,190,167316,851,0001,999,0002,449,408
35Jul 23, 2022 09:0265,082338,439,998316,901,0001,999,0002,281,472
36Jul 23, 2022 09:0165,431345,529,888318,616,0001,997,0002,281,472