CF630K.Indivisibility
普及/提高-
通过率:0%
时间限制:0.50s
内存限制:64MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is not divisible by any number from 2 to 10 every developer of this game gets a small bonus.
A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.
IT City 公司在开发电脑游戏时,决定改进其奖励员工的方式。新的奖励方式如下:每当一款新游戏发布后,用户便开始积极购买,公司会精确追踪每一笔交易的销量数据。每当销量总数(即截至当前的累计销量)不能被 2 到 10 中的任意一个数整除时,该款游戏的每位开发者都将获得一笔小额奖金。
游戏设计师小彼得(Petya)得知,公司即将发布一款新游戏,而他本人也参与了该游戏的部分开发工作。基于以往经验,他预测该游戏在发布后的第一个月内将有 n 人购买。现在,小彼得希望知道自己将获得多少次奖金。请帮助他计算这一数值。
输入格式
The only line of the input contains one integer n (1 ≤ n ≤ 1018) — the prediction on the number of people who will buy the game.
输入仅包含一行,其中有一个整数 n(1 ≤ n ≤ 1018)—— 表示预测的购买该游戏的人数。
输出格式
Output one integer showing how many numbers from 1 to n are not divisible by any number from 2 to 10.
输出一个整数,表示从 1 到 n 中有多少个数不能被 2 到 10 中的任意一个数整除。
输入输出样例
输入#1
12
输出#1
2
输入解题思路,AI测评打分。不知道怎么写?