(I2
I54
I4
(dp0
Vtimestamp.%l
p1
(Vtimestamp.cpp
p2
S'#include <iostream>\r\nusing namespace std;\r\ntypedef unsigned long long ull;\r\null timestamp, years, i;\r\nstring type, temp;\r\nint main()\r\n{\r\n    while (cin >> type && cin >> temp && cin >> timestamp)\r\n    {\r\n        if (type == "day") cout << timestamp - timestamp % 86400 << endl;\r\n        else if (type == "week") cout << timestamp - timestamp % (7 * 86400) - 3 * 86400 << endl;\r\n        else\r\n           {\r\n               years = 1970 + 4 * (timestamp / (3 * 365 * 86400 + 366 * 86400));\r\n               timestamp %= 3 * 365 * 86400 + 366 * 86400;\r\n               for (i = years+1; ; i++)\r\n               {\r\n                   if (timestamp < 365 * 86400)\r\n                   break;\r\n                   timestamp -= 365 * 86400;\r\n                   if ((i % 4 == 0 && i % 100) || i % 400 == 0)\r\n                   {\r\n                       if (timestamp < 86400)\r\n                       break;\r\n                       timestamp -= 86400;\r\n                   }\r\n               }\r\n               cout << i-1 << endl;\r\n           }\r\n    }\r\n}\r\n'
p3
tp4
stp5
.