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. ASP.NET整理

      Asp.net六大对象 1.Request-->读取客户端在Web请求期间发送的值 常用方法: 1.Request.UrlReferrer请求的来源,可以根据这个判断从百度搜的哪个关键词.防 ...

  2. 关于delegate, category和subclass

    因为自己在学习这三个概念的时候,实在是走了很多的弯路,而且当我意识到这些概念在cocoa中很重要时,我便更糊涂了…或许从C++或者Java转过来的高手一看就明白,所以高手您随便拍砖,指正我的错误:新手 ...

  3. 自定义实现简单的Android颜色选择器(附带源码)

    在写Android App过程中需要一个简单的颜色选择器,Android自带的ColorPicker和网上的一些ColorPicker都太高端了,都实现了颜色渐变功能,我要的不需要那么复杂,只想提供几 ...

  4. Mysql增加主键或者更改表的列为主键的sql语句

                                                                                                        ...

  5. Oracle中NVARCHAR2字符集不匹配问题

    Oracle中在做字符匹配时 遇到 NVARCHAR2 类型时报错,提示 字符集不匹配. 对使用 NVARCHAR2 的地方,需要对字段进行字符转换,加上 to_char(nvarchar2 字段) ...

  6. Appcn 移动开发 前台与服务器数据交互

    第一次写.嘿嘿. 言归正传,这几天开始学习移动开发,使用的是Appcan平台.Appcan平台采用HTML5+CSS3做开发 实现跨平台,正好可以满足我们的业务需求. Appacn和数据库进行交互的方 ...

  7. 改变UITextField placeHolder 字体 颜色

    [_textSearchField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"]; ...

  8. setTimeout、clearTimeout、setInterval,clearInterval ——小小计时器

    先看下效果 话不多说上代码~ <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Typ ...

  9. 详解null

    前言 在java中初始化的时候经常用到null,也经常会碰到空指针异常(NullPointerException),由于碰到的频率比较高,我认为有必要进行一下了解,揭开它的神秘面纱. 一.null是代 ...

  10. ZStack之ZDApp_Init解析

    [注:本文源自博客园http://www.cnblogs.com/cherishui/,为尊重劳动者成果,如需转载请保留此行] 以下代码分析基于ZStack-CC2530-2.5.1a,开发环境为 I ...