{"raw_statement":[{"iden":"statement","content":"You like to use your stopwatch all the time, but there is one major problem with it. The stopwatch only displays seconds, so when it says 472 seconds have passed you have no idea what that means. Given a time in seconds display the years, days, hours, minutes and seconds that have passed.\n\nThe first line is number of seconds that have gone by.\n\nPrint the time that has passed in the following format. \"X years, X days, X hours, X minutes and X seconds\". If the value for any time is 0, do not include it. Also be sure to watch out for plurals and using \"and\". If the time is 0, say \"now\" .\n\n"},{"iden":"input","content":"The first line is number of seconds that have gone by."},{"iden":"output","content":"Print the time that has passed in the following format. \"X years, X days, X hours, X minutes and X seconds\". If the value for any time is 0, do not include it. Also be sure to watch out for plurals and using \"and\". If the time is 0, say \"now\" ."},{"iden":"examples","content":"Input1\nOutput1 second\nInput98753213\nOutput3 years, 47 days, 23 hours, 26 minutes and 53 seconds\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s \\in \\mathbb{Z}_{\\geq 0} $ be the input time in seconds.\n\n**Constants**  \n- $ 1 \\text{ year} = 365 \\times 24 \\times 3600 = 31536000 $ seconds  \n- $ 1 \\text{ day} = 24 \\times 3600 = 86400 $ seconds  \n- $ 1 \\text{ hour} = 3600 $ seconds  \n- $ 1 \\text{ minute} = 60 $ seconds  \n\n**Compute**  \nLet:  \n- $ y = \\left\\lfloor \\frac{s}{31536000} \\right\\rfloor $  \n- $ d = \\left\\lfloor \\frac{s \\bmod 31536000}{86400} \\right\\rfloor $  \n- $ h = \\left\\lfloor \\frac{s \\bmod 86400}{3600} \\right\\rfloor $  \n- $ m = \\left\\lfloor \\frac{s \\bmod 3600}{60} \\right\\rfloor $  \n- $ sec = s \\bmod 60 $  \n\n**Objective**  \nOutput the string:  \n- If $ s = 0 $: \"now\"  \n- Else:  \n  Construct a list of non-zero components:  \n  $ \\text{components} = \\left\\{ (y, \\text{\"year\"}), (d, \\text{\"day\"}), (h, \\text{\"hour\"}), (m, \\text{\"minute\"}), (sec, \\text{\"second\"}) \\right\\} $  \n  For each $ (v, unit) $, if $ v > 0 $, append:  \n  - $ v $ + \" \" + $ unit $ + ( \"s\" if $ v \\neq 1 $ else \"\" )  \n  Join all but the last component with \", \", and the last with \" and \" if more than one component exists.","simple_statement":"Given a number of seconds, convert it to years, days, hours, minutes, and seconds, and print in format: \"X years, X days, X hours, X minutes and X seconds\". Skip zeros. Use plural if needed. Use \"and\" before the last non-zero part. If 0, print \"now\".","has_page_source":false}