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 13:26Karthik 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 13:27056,715,15047,874,00002,113,536expected "3470105120346817 ", got " f12=7437 f13=7089 c12=4531 c13=4723 f12=6789 f13=7095 c12=4533 c13=4722 "
2Oct 5, 2026 13:27057,063,44848,215,00002,113,536expected "3473190807649095 ", got " f12=7502 f13=7228 c12=4512 c13=4760 f12=6772 f13=7206 c12=4515 c13=4759 "
3Oct 5, 2026 13:27056,526,06447,661,00002,113,536expected "3474481654046770 ", got " f12=6956 f13=7183 c12=4525 c13=4758 f12=6835 f13=7174 c12=4523 c13=4757 "