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 each possible group composition and select one of them. Your task is to count the number of variants of group composition to evaluate.

Input

The only line of the input contains one integer n (7 ≤ n ≤ 777) — the number of potential employees that sent resumes.

Output

Output one integer — the number of different variants of group composition.

Examples
input
7
output
29
从n个人中选5,6,7个一共多少种选法
#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;
ULL C(int n,int m)
{
if(n<m) return 0;
ULL ans=1;
for(int i=0;i<m;i++) ans=ans*(ULL)(n-i)/(ULL)(i+1);
return ans;
}
ULL A(int n,int m)
{
if(n<m) return 0;
ULL ans=1;
for(int i=0;i<m;i++) ans*=(ULL)(n-i);
return ans;
}
int main()
{
cin>>n;
cout<<C(n,5)+C(n,6)+C(n,7)<<endl;
return 0;
}

  

最新文章

  1. HEU KMS Activator v11.1.0 Windows激活
  2. jquery 实现页面局部刷新ajax做法
  3. 使用Gmail发送邮件心得
  4. [LeetCode] Ugly Number (A New Question Added Today)
  5. CentOS下yum安装mysql,jdk以及tomcat
  6. 【转】Android中Spinner下拉列表(使用ArrayAdapter和自定义Adapter实现)
  7. IOS-UITableView开发常用各种方法总结
  8. Struts2 使用通配符动态请求Action
  9. UVALive 6709 - Mosaic 二维线段树
  10. IE8下提示&#39;console&#39;未定义错误
  11. [翻译]编写高性能 .NET 代码 第一章:工具介绍 -- Performance Counters(性能计数器)
  12. ORACLE 中NUMBER类型默认的精度和Scale问题
  13. Django REST framework+Vue 打造生鲜超市(三)
  14. 编程心法 之 怎么选择合适的IDE
  15. Spring MVC Content Negotiation 转载
  16. semantic-ui 输入框
  17. c# 获取键盘的输入
  18. 统计硬币 HDU - 2566 (三种解法:线性代数解法,背包解法,奇思妙想解法 &gt;_&lt; )
  19. 解决Win10 Virtualbox5.2.18桥接不能联网小记
  20. getsockopt和accept需要注意的两个细节

热门文章

  1. android tween动画和Frame动画总结
  2. day17-jdbc 2.jdbc介绍
  3. 爬取google的搜索结果并保存
  4. Codeforces 1093E Intersection of Permutations (CDQ分治+树状数组)
  5. java的邮件系统实现
  6. 算法Sedgewick第四版-第1章基础-2.1Elementary Sortss-003比较算法及算法的可视化
  7. 20.LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别
  8. 完全离线安装VSCode插件--Eslint
  9. MVC Controller传值到View的几种方式总结
  10. 怎么用Shell连接VirtualBox Linux虚拟机,在Mac电脑上