SGU---105 水题
题目链接:
https://cn.vjudge.net/problem/SGU-105
题目大意:
定义一个数列
1,12,123,1234,12345......12345678910,1234567891011
求第1-n项中能整除3的项的项数
解题思路:
水题,找规律就行
#include<bits/stdc++.h>
using namespace std; int main()
{
int n, ans;
cin >> n;
ans = n / * ;
if(n % == )ans++;
cout<<ans<<endl;
return ;
}
SGU---105 水题的更多相关文章
- (水题) Div 3 -- SGU -- 105
链接: http://vj.acmclub.cn/contest/view.action?cid=168#problem/E 时限:250MS 内存:4096KB 64位IO格式:%I ...
- SGU 538. Emoticons 水题
538. Emoticons 题目连接: http://acm.sgu.ru/problem.php?contest=0&problem=538 Description A berland n ...
- 水题 Codeforces Round #105 (Div. 2) B. Escape
题目传送门 /* 水题:这题唯一要注意的是要用double,princess可能在一个小时之内被dragon赶上 */ #include <cstdio> #include <alg ...
- CF451C Predict Outcome of the Game 水题
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...
- CF451B Sort the Array 水题
Codeforces Round #258 (Div. 2) Sort the Array B. Sort the Array time limit per test 1 second memory ...
- CodeForces 589I Lottery (暴力,水题)
题意:给定 n 和 k,然后是 n 个数,表示1-k的一个值,问你修改最少的数,使得所有的1-k的数目都等于n/k. 析:水题,只要用每个数减去n/k,然后取模,加起来除以2,就ok了. 代码如下: ...
- 动态规划之HDU水题
做水题的感觉真好系列 HDU 2084 数塔 1: 12: 1 23: 1 2 34: 1 2 3 45: 1 2 3 4 5 dp[i][j]第i行第j个数取得的最大值dp[i][j] = max( ...
- hdu5360 Hiking(水题)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Hiking Time Limit: 6000/3000 MS (Java/Oth ...
- CF330 C. Purification 认真想后就成水题了
C. Purification time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...
- codeforcess水题100道
之所以在codeforces上找这100道水题的原因是为了巩固我对最近学的编程语言的掌握程度. 找的方式在codeforces上的PROBLEMSET中过的题最多的那些题里面出现的最前面的10个题型, ...
随机推荐
- favi.icon是什么?
各大网站都有属于自己的图标 概念解释: ico是Icon file的缩写,是Windows的图标文件格式的一种 1.制作ico格式的图片一个上传到服务器的根目录图片保存为favicon.ico 2.制 ...
- sgsdg
wrjow we wetwer werwer werwer werqw qweqwrq qwrqwr @ApiOperation("根据条件分页查询试卷") @ApiRespons ...
- Struts2和MVC的简单整合
1.首先还是创建一个简单Maven的项目,导入jar包, <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:x ...
- php5.6+apache2.4+linux搭建php环境
前言 最近突然想搭建个人博客,尽管笔者擅长java-web,但综合各种原因,于是选择了大众化的php+mysql搭建个人博客.对于php,只闻其大名,但从未学过,于是,笔者将从php环境搭建开始,到服 ...
- Differences between page and segment
https://techdifferences.com/difference-between-paging-and-segmentation-in-os.html how does paging so ...
- SQL0286N 找不到页大小至少为 "8192"、许可使用授权标识 "db2inst" 的缺省表空间。
在 SQL 处理期间,它返回: SQL0286N 找不到页大小至少为 "8192".许可使用授权标识 "db2inst" 的缺省表空间. 顾名思义,DB2默认 ...
- Fatal error: Call to undefined function curl_init()解决办法
问题描述: 在Windows SERVER 2012RC 64 bit OS, php 5.6.3的环境下,搭建好了php运行环境.但是在调用 curl_init() 方法时却报错了. 检查了一下,p ...
- CSS3D动画制作一个3d旋转的筛子
希望这个demo能让大家理解CSS3的3d空间动画(其实是个假3D) 首先给一个3d的解剖图,x/y/z轴线轴线已经标出 下面附上添加特效的动画旋转 可以根据demo并参考上面解剖图进行理解 < ...
- Difference between 'SAME' and 'VALID' padding
Difference between 'SAME' and 'VALID' padding 'SAME' padding 和 'VALID' padding 的区别 If you like ascii ...
- hadoop HA集群搭建步骤
NameNode DataNode Zookeeper ZKFC JournalNode ResourceManager NodeManager node1 √ √ √ √ node2 ...