The 5th Zhejiang Provincial Collegiate Programming Contest------ProblemA:Accurately Say "CocaCola"!
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2965
题意:一群人玩过“7”的游戏,有7的数字或者7的倍数就要喊“cocacola”。给出一个数字p,求连续要喊“cocacola”p次的最小数字s;
思路:刚开始想着,2是27,3-10都是70,11-100都是700。。。后来一直WA,打个表才知道,270-280有11个。。。。所以....
#include<bits/stdc++.h>
using namespace std;
int main() {
int t,p,s;
cin>>t;
while(t--) {
cin>>p;
if(p==)
s=;
else if(p==)
s=;
else if(p>&&p<=)
s=;
else if(p==)
s=;
else if(p>&&p<=)
s=;
cout<<s<<endl;
}
return ;
}
The 5th Zhejiang Provincial Collegiate Programming Contest------ProblemA:Accurately Say "CocaCola"!的更多相关文章
- nenu contest3 The 5th Zhejiang Provincial Collegiate Programming Contest
ZOJ Problem Set - 2965 Accurately Say "CocaCola"! http://acm.zju.edu.cn/onlinejudge/showP ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest May Day Holiday
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5500 The 12th Zhejiang Provincial ...
- 140 - The 12th Zhejiang Provincial Collegiate Programming Contest(第二部分)
Floor Function Time Limit: 10 Seconds Memory Limit: 65536 KB a, b, c and d are all positive int ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Capture the Flag
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5503 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Beauty of Array
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5496 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Lunch Time
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Convert QWERTY to Dvorak
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5502 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Demacia of the Ancients
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5504 The 12th Zhejiang Provincial ...
- zjuoj The 12th Zhejiang Provincial Collegiate Programming Contest Ace of Aces
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5493 The 12th Zhejiang Provincial ...
随机推荐
- MyEclipse SVN 插件
一.下载SVN插件subclipse 下载地址:http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240 在打开的网 ...
- 设置In_Memery
alter system set inmemory_size=4G scope=spfile; alter table table_name inmemory; alter table table_n ...
- iOS - 数组与字典(NSArray & NSDictionary)
1. 数组的常用处理方式 //--------------------不可变数组 //1.数组的创建 NSString *s1 = @"zhangsan"; NSString *s ...
- ThreadPool 线程池的作用
相关概念: 线程池可以看做容纳线程的容器: 一个应用程序最多只能有一个线程池: ThreadPool静态类通过QueueUserWorkItem()方法将工作函数排入线程池: 每排入一个工作函数,就相 ...
- C#使用反射工厂模式遇到System.TypeLoadException(类名错误导致)
项目中,在运行另一个反射类时出现问题,未能从程序集中加载类 class PopUpActionFactory { public static InterfacePopUpAction getActio ...
- thinkphp3.2引入php 实例化类
如果你的类库没有采用命名空间的话,需要使用import方法先加载类库文件,然后再进行实例化,例如:我们定义了一个Counter类(位于Com/Sina/Util/Counter.class.php): ...
- yum的一些用法
对于配置仓库这里就不做讲解了,这里只是列出比较实用的yum的用法 yum install packagename #安装软件包 yum remove packagena ...
- web网页的表单排版利器--960css
表单排版样式 960css 前言 一般web网页的表单排版,大家都习惯用table排版,自己需要根据实际需要去定义TR和TD,很多时候对于TD的高宽度.是否合并行,合并列,都要去做一些处理,这些都是比 ...
- 【转】M0,M1,M2,M3,M4基本概念
在金融学中的M1,M2,M3,M4都是货币层次的划分M0= 流通中的现金;M1=M0+ 个人信用卡循环信用额度+ 银行借记卡活期存款+ 银行承兑汇票余额+ 企业可开列支票活期存款;M2=M1+ 个人非 ...
- linux之cat命令
1. cat 接普通文件名,会把文件内容打印到屏幕:2. cat > file,这个可以向文件“file”写入内容,最后按 Ctrl + D 结束输入,会将你输入的数据保存到文件. cat主要有 ...