Experimental Educational Round: VolBIT Formulas Blitz J

Description

IT City company developing computer games invented a new way to reward its employees. 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 divisible by all numbers 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.

Input

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.

Output

Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.

Examples

input

3000

output

1

问能同时被2到10整除的,有多少个

算出2到10的最小公倍数

#include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x7fffffff
#define INF 0x7fffffffffffffff
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
using namespace std;
LL n;
int main()
{
    cin>>n;
    cout<<n/2520<<endl;
    return 0;
}

  

时间: 2024-10-16 12:04:41

Experimental Educational Round: VolBIT Formulas Blitz J的相关文章

Experimental Educational Round: VolBIT Formulas Blitz D

Description After a probationary period in the game development company of IT City Petya was included in a group of the programmers that develops a new turn-based strategy game resembling the well known "Heroes of Might & Magic". A part of t

Experimental Educational Round: VolBIT Formulas Blitz C

Description The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers. Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office g

Experimental Educational Round: VolBIT Formulas Blitz F

Description One company of IT City decided to create a group of innovative developments consisting from 5 to 7 people and hire new employees for it. After placing an advertisment the company received n resumes. Now the HR department has to evaluate e

Experimental Educational Round: VolBIT Formulas Blitz K

Description 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 precisi

【Codeforces Round 1132】Educational Round 61

Codeforces Round 1132 这场比赛做了\(A\).\(B\).\(C\).\(F\)四题,排名\(89\). \(A\)题\(wa\)了一次,少考虑了一种情况 \(D\)题最后做出来,但被\(hack\)了...被\(hack\)的原因是没有想到答案会超过\(10^{12}\)(毕竟这个时间上的优化也是在最后迫不得已的情况下加的,就没有考虑正确性... Codeforces 1132 C 题意:给一些区间\([l_i,r_i]\),从中删掉两个,求剩下的区间最多能够覆盖的格子数

【Codeforces】Educational Round 61

今天刚打完一场,心情异常烂,只做出来一道题,开错题了然后没钻出来,机房的小伙伴都切了四道题了...可能又要掉了,要继续努力了. 这次Edu Round比赛是这周第二次在宿舍请假了,等网安结束了就退宿吧. 比较顺利的做出了ABC,然后看人数去推了F题,不过没什么结果. 然后在改代码的时候结识了白学长,:) 话说这几天好燥啊,G题其实代码挺好理解但愣是拖了两天啊. Problem A. Regular Bracket Sequence 题目大意:现在给出 4 种括号依次为 "((" , &

Educational Round 15

A题Maximum Increase 大水题.最长连续递增子序列有多长. 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 int main() 5 { 6 int n, a, rec = 0, len = 0, ans = 1; 7 scanf("%d",&n); 8 for(int i = 0; i < n; i++) 9 { 10 scanf("%

Educational Round 66 题解

作为橙名来水了一发…… 这次题目就比上次良心多了.7题有5题会做. 然而风格仍然很怪异……还是练少了? A 水题.不过一开始没注意细节挂了几发,罚时罚的真痛…… 明显是能除以 $k$ 就除以 $k$,否则就 $-1$.但注意不能直接最裸的模拟. 时间复杂度 $O(T\log n)$. #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; const

codeforces educational round 73 div2 ABCD

A. 2048 Game Description 给出n个2的幂次数,问能否累加得到2048 Solution 从小往上累加. B. Knights Description Solution 贪心构造. 奇数位和偶数位放置不同就行了. C. Perfect Team Description 给出三个数,$c,m,x$代表每种选手的个数. 每三个人组一队,每队要求至少有一个c,一个m. 问最多能组多少支队伍. Solution 显然最多只能组成$min(c,m)$只队伍. 这是在$x \geq m