Parse dateTime Andrey Tsvetkov

Compute the sum of 5,000,000 UTC Unix timestamps as fast as possible.

Input

One RFC 3339 datetime per line on STDIN:

2017-05-04T14:31:30-03:00
2046-06-23T11:51:56-06:00
2031-08-14T13:18:38+06:00
2048-04-14T05:55:06-09:00
1980-08-28T00:43:03+02:00

Output

Print the sum of all UTC Unix timestamps (int64) to STDOUT.

Constraints

  • Datetimes are in the range 1950-01-01T00:00:00 to 2050-12-31T23:59:59
Back to listOct 5, 2026 22:41Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 22:42017,774,4508,731,00002,117,632expected "3469893171180484 ", got "0 5642 5519 5131 5118 5048 5062 5020 5022 4999 5018 4996 5045 5032 5030 5005 7795 0 "
2Oct 5, 2026 22:42017,669,2548,675,00002,117,632expected "3467932117513056 ", got "0 5731 5282 5099 4986 5027 4978 5020 4990 4982 5011 5014 4976 5012 4984 5010 7735 0 "
3Oct 5, 2026 22:42017,669,7688,661,00002,117,632expected "3471250925311103 ", got "0 5720 5291 5049 5035 4991 5018 4974 4998 4986 4991 4979 5041 4982 5013 4975 7729 1 "