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-;
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=;
while(!isdigit(c)) c=getchar();
while(isdigit(c)) {x=x*+c-''; c=getchar();}
} int n; int main()
{
scanf("%d",&n);
int ans1=,ans2=;
for(int i=;i<=n;i++)
{
if(i%==||i%==) ans1++;
if(i%==||i%==) ans2++;
}
printf("%d %d\n",ans2,ans1); return ;
}
CodeForces 670A Holidays的更多相关文章
- Codeforces Round #350 (Div. 2)解题报告
codeforces 670A. Holidays 题目链接: http://codeforces.com/contest/670/problem/A 题意: A. Holidays On the p ...
- Codeforces Gym 100187D D. Holidays 排列组合
D. Holidays Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/D ...
- Codeforces Round #350 (Div. 2) A. Holidays 水题
A. Holidays 题目连接: http://www.codeforces.com/contest/670/problem/A Description On the planet Mars a y ...
- CodeForces 670 A. Holidays(模拟)
Description On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Ma ...
- Educational Codeforces Round 6 E. New Year Tree dfs+线段树
题目链接:http://codeforces.com/contest/620/problem/E E. New Year Tree time limit per test 3 seconds memo ...
- Educational Codeforces Round 21(A.暴力,B.前缀和,C.贪心)
A. Lucky Year time limit per test:1 second memory limit per test:256 megabytes input:standard input ...
- Codeforces Round #336 (Div. 2)【A.思维,暴力,B.字符串,暴搜,前缀和,C.暴力,D,区间dp,E,字符串,数学】
A. Saitama Destroys Hotel time limit per test:1 second memory limit per test:256 megabytes input:sta ...
- Codeforces Round #415 (Div. 2)(A,暴力,B,贪心,排序)
A. Straight «A» time limit per test:1 second memory limit per test:256 megabytes input:standard inpu ...
- Codeforces 670 - A/B/C/D/E/F - (Done)
链接:https://codeforces.com/contest/670 A - Holidays - [水] AC代码: #include<bits/stdc++.h> using n ...
随机推荐
- windows 常用操作
资源管理器 资源管理器中进入上一级目录:Alt+向上箭头 常用命令行命令 打开windows服务:services.msc 以管理员身份运行程序 按下Win键,在打开的窗口中输入命 ...
- Bootstrap3.0学习第六轮(表单)
Bootstrap3.0学习第六轮(表单) 前言 阅读之前您也可以到Bootstrap3.0入门学习系列导航中进行查看http://www.cnblogs.com/aehyok/p/3404867.h ...
- RPC技术
微软RPC技术学习小结 RPC,即Remote Procedure Call,远程过程调用,是进程间通信(IPC, Inter Process Communication)技术的一种.由于这项技术在自 ...
- iframe跨域通讯
工作中遇到一个问题,IFRAME嵌套了一个外部页面用于统计 统计的JS由我们提供,并且需要提供热点图 一开始就碰到的问题就是 不知道页面高度 需要子页面传回页面高度用于将IFRAME拉升到合适高度 当 ...
- C++数据结构之二叉查找树(BST)
C++数据结构之二叉查找树(BST) 二分查找法在算法家族大类中属于“分治法”,二分查找的过程比较简单,代码见我的另一篇日志,戳这里!因二分查找所涉及的有序表是一个向量,若有插入和删除结点的操作,则维 ...
- defer 与 async
defer HTML4.01定义的 只适用于外部脚本(IE4~7会支持内嵌脚本的defer属性) 告诉浏览器立即下载,延迟执行,脚本会延迟到整个页面全部解析完毕之后才运行 HTML5规范要求脚本按照他 ...
- java 读取图片色深
问题: 想写一个小程序可读取图片的色深(bit-depth).网上有一些软件可完成这个功能,但是我想把程序做成一个可移植的插件. 本想用c写的,但实在麻烦,最后选择java,与很多方法不用自己写,速度 ...
- Memcache的一些学习
Memcache的一些学习 首先,Memcache是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提供动态.数据库驱动 ...
- JS 实现图片直接下载
< a href = "picName.jpg" id = pic1 onclick = "savepic();return false;" ...
- ubuntu 安装jdk7总结
ubuntu 安装jdk7,现在来总结一下: 第一步:下载jdk-7u25-linux-x64.tar.gz 直接在ORACLE的官网中下载就可以: http://download.oracle.co ...