题目链接:http://www.codeforces.com/problemset/problem/122/A
题意:判断一个数是否能被一个lucky number整除,一个lucky number是一个只包含4或7的数。
C++代码:

#include <cstdio>
int lucky[] = {, , , , , , , , , , , , , };
bool check(int x)
{
for (int i = ; i < ; i ++)
if (x % lucky[i] == )
return true;
return false;
}
int main()
{
int n;
scanf("%d", &n);
puts(check(n) ? "YES" : "NO");
return ;
}

C++

codeforces水题100道 第十二题 Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division (brute force)的更多相关文章

  1. codeforces水题100道 第二十二题 Codeforces Beta Round #89 (Div. 2) A. String Task (strings)

    题目链接:http://www.codeforces.com/problemset/problem/118/A题意:字符串转换……C++代码: #include <string> #inc ...

  2. Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division【暴力/判断是不是幸运数字4,7的倍数】

    A. Lucky Division time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  3. codeforces水题100道 第二十六题 Codeforces Beta Round #95 (Div. 2) A. cAPS lOCK (strings)

    题目链接:http://www.codeforces.com/problemset/problem/131/A题意:字符串大小写转换.C++代码: #include <cstdio> #i ...

  4. codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings)

    题目链接:http://www.codeforces.com/problemset/problem/339/A题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列.C++代码: #include ...

  5. codeforces水题100道 第二十四题 Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings (strings)

    题目链接:http://www.codeforces.com/problemset/problem/112/A题意:忽略大小写,比较两个字符串字典序大小.C++代码: #include <cst ...

  6. codeforces水题100道 第十九题 Codeforces Round #109 (Div. 2) A. I_love_%username% (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/155/A题意:找到当前最大值或者最小值出现的次数.“当前”的意思差不多是a[i]大于所有a[j]( ...

  7. codeforces水题100道 第十八题 Codeforces Round #289 (Div. 2, ACM ICPC Rules) A. Maximum in Table (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/509/A题意:f[i][1]=f[1][i]=1,f[i][j]=f[i-1][j]+f[i][j ...

  8. codeforces水题100道 第十六题 Codeforces Round #164 (Div. 2) A. Games (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/268/A题意:足球比赛中如果主场球队的主场球衣和客队的客队球衣颜色一样,那么要求主队穿上他们的可对 ...

  9. codeforces水题100道 第十五题 Codeforces Round #262 (Div. 2) A. Vasya and Socks (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/460/A题意:Vasya每天用掉一双袜子,她妈妈每m天给他送一双袜子,Vasya一开始有n双袜子, ...

随机推荐

  1. 清华DNS

    DNS: 166.111.8.28 166.111.8.29 FQ方式:http://www.cnblogs.com/huangshiyu13/p/6227068.html

  2. Linux之查看切换Shell

    1.查看存在的shell cat /etc/shells 2.查看使用的shell echo $SHELL 3.切换shell 切换bash chsh -s /bin/bash 切换zsh chsh ...

  3. tomcat部署时war和war exploded区别

    war模式—-将WEB工程以包的形式上传到服务器 war exploded模式—-将WEB工程以当前文件夹的位置关系上传到服务器

  4. e864. 取的显示器大小尺寸

    See also e670 缓冲图像转换为图像. try { Robot robot = new Robot(); // Capture a particular area on the screen ...

  5. (转)并行编译 Xoreax IncrediBuild

    出自:http://blog.csdn.net/yockie/article/details/16867457 以前完全没有接触过分布式编译,今天因工作需要尝试了一下,绝对很强大,体验也非常好,绝对让 ...

  6. Cisco配置单臂路由及静态路由

    实验环境: 如图下图所示,PC0.PC1.PC2.PC3分别属于不同的VLAN,通过配置单臂路由及静态路由,实现不同VLAN之间的PC能相互访问. 操作步骤: 1. 思科 2960交换机SW1配置信息 ...

  7. TCDB 数据库简介

    TCDB是对膜转运蛋白(Membrane Transport Protein)进行分类的一个数据库,它制定了一套转运蛋白分类系统(Transporter Classification), 简称TC S ...

  8. XAMPP permissions on Mac OS X

    $ cd /Applications $ XAMPP/ 注意: 改变的是XAMPP目录,而不是htdocs ref: http://stackoverflow.com/questions/904697 ...

  9. Jenkins的安装配置[转]

    Jenkins的安装配置 一.Jenkins简介 Jenkins 是一个可扩展的持续集成引擎.Jenkins可以帮我们将代码进行统一的编译打包.还可以放到tomcat容器中进行发布.简单来说就是我们通 ...

  10. 带有Header的SOAP 请求

    package demo.test; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import org.t ...