CodeForces 670A Holidays
Posted Fighting Heart
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CodeForces 670A Holidays相关的知识,希望对你有一定的参考价值。
简单题。
#pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<vector> #include<map> #include<set> #include<queue> #include<stack> #include<iostream> using namespace std; typedef long long LL; const double pi=acos(-1.0),eps=1e-6; void File() { freopen("D:\\in.txt","r",stdin); freopen("D:\\out.txt","w",stdout); } template <class T> inline void read(T &x) { char c=getchar(); x=0; while(!isdigit(c)) c=getchar(); while(isdigit(c)) {x=x*10+c-‘0‘; c=getchar();} } int n; int main() { scanf("%d",&n); int ans1=0,ans2=0; for(int i=1;i<=n;i++) { if(i%7==1||i%7==2) ans1++; if(i%7==6||i%7==0) ans2++; } printf("%d %d\n",ans2,ans1); return 0; }
以上是关于CodeForces 670A Holidays的主要内容,如果未能解决你的问题,请参考以下文章
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2) C. Fountains 树状数组维护区间最大值(示(代
ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) A Palindromic Supersequence(代
1-The INRIA Holidays dataset 数据集
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) C. Stairs and Elevators二分查找(示例(代
Codeforces Round #438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined) A,B,C真的菜·(代