{"problem":{"name":"[朝阳区小学组 2019] nonzero","description":{"content":"小明最近对阶乘很感兴趣，但是阶乘增长的太快了。如 $13!$ 就必须用 $64$ 位整数类型来存储，$70!$ 即使浮点数也存不下。小明想知道阶乘最后面的非零位是多少。 例如：$5!=1\\times 2\\times 3\\times 4\\times 5=120$，所以 $5!$ 最后面的非零位是 $2$。 $7!=1\\times 2\\times 3\\times 4\\times 5\\times 6","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB4268"},"statements":[{"statement_type":"Markdown","content":"小明最近对阶乘很感兴趣，但是阶乘增长的太快了。如 $13!$ 就必须用 $64$ 位整数类型来存储，$70!$ 即使浮点数也存不下。小明想知道阶乘最后面的非零位是多少。\n\n例如：$5!=1\\times 2\\times 3\\times 4\\times 5=120$，所以 $5!$ 最后面的非零位是 $2$。\n\n$7!=1\\times 2\\times 3\\times 4\\times 5\\times 6\\times 7=5040$，所以 $7!$ 最后面的非零位是 $4$。\n\n## Input\n\n一行，一个整数 $N$（$N\\leq1000$）。\n\n## Output\n\n一行，输出 $N!$ 最后面的非零位。\n\n[samples]\n\n## Background\n\n数据为洛谷自造。","is_translate":false,"language":"English"}],"meta":{"iden":"LGB4268","tags":["2019","数论","北京","科创活动","小学活动"],"sample_group":[["7","4"]],"created_at":"2026-03-03 11:09:25"}}