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"!的更多相关文章

  1. nenu contest3 The 5th Zhejiang Provincial Collegiate Programming Contest

    ZOJ Problem Set - 2965 Accurately Say "CocaCola"!  http://acm.zju.edu.cn/onlinejudge/showP ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation

    http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...

  6. 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 ...

  7. zoj The 12th Zhejiang Provincial Collegiate Programming Contest Lunch Time

    http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial ...

  8. 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 ...

  9. 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 ...

  10. 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 ...

随机推荐

  1. nginx限制ip请求次数 以及并发次数

    如何设置能限制某个IP某一时间段的访问次数是一个让人头疼的问题,特别面对恶意的ddos攻击的时候.其中CC攻击(Challenge Collapsar)是DDOS(分布式拒绝服务)的一种,也是一种常见 ...

  2. contentProvider-联系人的CURD

    1.联系人的查找 返回一个ArrayList<HashMap<String,  String>>类型 //通过管理联系人的URI获取游标对象 Cursor cursor= ge ...

  3. 【网络收集】MySql中IS NOT NULL与!=NULL的区别

    在mysql中,筛选非空的时候经常会用到is not null和!=null,这两种方法单从字面上来看感觉是差不多的,其实如果去运行一下试试的话差别会很大!为什么会出现这种情况呢?null 表示什么也 ...

  4. Java之日期和时间的计算

    学习是一个循序渐进的过程,不知道你们有没有这样的感受:有很多学习过的知识在很久没有温习之后就不知不觉地还给老师了.所以最近总结,把那些还给老师的再找回来. 运行图: 时间戳: 运行效果图: 时间日期的 ...

  5. Linq to sql 接收存储过程返回的多个结果集

    故事前提.......... 一.返回顺序结果集 存储过程实例 CREATE PROCEDURE MultipleResultTypesSequentially AS select * from pr ...

  6. 带搜索的下拉框Chosen

    一:参考 https://harvesthq.github.io/chosen/ Chosen是一个jQuery插件 二:引入js文件 <link href="plug-in/chos ...

  7. 分享一个很好用的 日期选择控件datepicker 使用方法分享

    很多同学在做网站的时候,有时候需要用户选择日期,年月日这些的,以前我也在用一个,但是那个的界面都不太好看,于是找啊找,找啊找,找到一个好东西,就是这个,datepicker,是jquery.ui里面的 ...

  8. PHP 跨域写cookie

    实际工作中,类似这样的要求很多,比如说,我们有两个域名,我们想实现在一个域名登录后,能自动完成另一个域名的登录,也就是PASSPORT的功能. 我只写一个大概,为了测试的方便,先编辑hosts文件,加 ...

  9. Python字符串内建处理函数

    #coding=utf-8 __author__ = 'Administrator' # 字符串处理函数 s1 = "study python string function , I lov ...

  10. ARM-Linux S5PV210 UART驱动(5)----串口的open操作(tty_open、uart_open)

    串口驱动初始化后,串口作为字符驱动也已经注册到系统了,/dev目录下也有设备文件节点了. 那接下来uart的操作是如何进行的呢? 操作硬件之前都是要先open设备,先来分析下这里的open函数具体做了 ...