Experimental educational round:volbit formulas Blitz F

Source: Internet
Author: User

Description

One company's IT City decided to create a group of innovative developments consisting from 5 to 7 people and hire New employees for it. After placing a advertisment the company received N resumes. Now the HR department have to evaluate each possible group composition and select one of the them. Your Task is to count the number of variants of the group composition to evaluate.

Input

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

Output

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

Examples input
7
Output
29
Choose from 5,6,7 A total number of choices from n individuals
#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 longusing Namespa CE 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;}

  

Experimental educational round:volbit formulas Blitz F

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.