首页 > 代码库 > FZU 2167 大王叫我来巡山呐

FZU 2167 大王叫我来巡山呐

第一篇 先水一题吧

#include<stdio.h>#include<string.h>#include<math.h>#include<iostream>#include<algorithm>#include<queue>#include<stack>#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#define MAXN 1000#define INF 0x7ffffff#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;int main(){    int n;    while(scanf("%d",&n)!=EOF)    {        int coun,ans;        coun=n/7;        ans=2*coun;        if((n+1)/7!=coun)//加一天 多一周 则必然为周六        ans++;        cout<<ans<<endl;    }    return 0;}