1 #include<iostream>
2 using namespace std;
3
4 int main() {
5 bool isPalindromic (int num);
6 int res = 0;
7
8 for(int i = 100; i < 1000 ; i++)
9 for(int j = 100; j < 1000; j++) {
10 if( isPalindromic(i*j) && i*j > res)
11 res = i*j;
12 }
13 cout << res;
14 system("pause");
15 return 0;
16 }
17 //判断回文
18 bool isPalindromic(int num) {
19 int rev_num = 0;
20 int m = num;//商
21 while(m != 0) {
22 rev_num = rev_num * 10 + m%10;
23 m = m/10;
24 }
25 if( rev_num == num)
26 return true;
27 else
28 return false;
29 }

ProjectEuler 004题的更多相关文章

  1. ProjectEuler 做题记录

    退役选手打发时间的PE计划 挂在这里主要是dalao们看到有什么想交流的东西可以私聊哦(站内信或邮箱吧)~~当然现在高三也不怎么能上网. 2017/8/11  595 :第一题QAQ 2017/8/1 ...

  2. ProjectEuler 005题

    题目: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any ...

  3. ProjectEuler 009题

    题目: A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For exam ...

  4. ProjectEuler 008题

    题目: The four adjacent digits in the 1000-digit number that have the greatest product are 9 9 8 9 = 5 ...

  5. ProjectEuler 007题

    题目:By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is ...

  6. ProjectEuler 006题

    题目: The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square ...

  7. ProjectEuler 003题

    1 //题目:The prime factors of 13195 are 5, 7, 13 and 29. 2 //What is the largest prime factor of the n ...

  8. nim也玩一行流,nim版的list comprehension

    nim 是一门风格类似python的静态编译型语言,官方网站:http://nim-lang.org 如果你想折腾nim的编辑环境,可以用sublime text3 +插件nimlime,notepa ...

  9. ProjectEuler && Rosecode && Mathmash做题记录

    退役选手打发时间的PE计划 挂在这里主要是dalao们看到有什么想交流的东西可以私聊哦(站内信或邮箱吧) 2017/8/11  PE595 :第一题QAQ 2017/8/12  PE598 2017/ ...

随机推荐

  1. kubespray-2.14.2安装kubernetes-1.18.10(ubuntu-20.04.1)

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  2. 将已经基本完成的项目推送到gitee上管理

    1,首先在gitee上创建仓库,保留一个.gitigonore就行,这样就得到一个远程仓库地址 2,仓库有文件,那么就需要先将这个文件pull下来: 在本地的项目目录中执行:git init git ...

  3. 前端小技巧:css sprite----V客学院技术分享

    前端小技巧:css sprite 因为英文名叫sprite,翻译过来是精灵,而雪碧饮料也叫sprite,所以叫精灵兔或者雪碧图. 它有什么作用呢? 当用户在浏览器里输入一个URL地址的时候,你会感觉无 ...

  4. 未开通js之前的纯css网页主题

    本主题修改自其他大佬:Rocket1184/MaterialCnblogs: Material Theme for cnblogs.com (github.com) 只需在博客后台选择"禁用 ...

  5. 【论文集合】机器翻译NMT中数据打分和数据选择的经典方法

    根据Survey of Data-Selection Methods in Statistical Machine Translation的总结,MT中的数据选择分类图如下: 使用场景 数据使用的场景 ...

  6. (JAVA1)学习,复习的好帮手

    学习准备:博客 博客,英文名Blog,它的正式名称为网络日记. 为什么要写博客 我们学习任何东西都需要总结和思考.有时候我们一直在赶路,却忘了放慢脚步 提升文笔组织能力 提升学习总结能力 提升逻辑思维 ...

  7. ifix 自动化(Automation)错误弹窗的解决方案

    在先前ifix项目中添加了语音模块,然后概率性跳出自动化(Automation)错误弹窗,先前分析了很多种原因,从代码的冗余,编码等角度进行了优化,效果不是很理想,仍然会概率性出现.经过反反复复大约3 ...

  8. js中变量提升和函数提升

    变量提升和函数提升的总结 我们在学习JavaScript时,会遇到变量提升和函数提升的问题,为了理清这个问题,现做总结如下,希望对初学者能有所帮助 我们都知道 var 声明的变量有变量提升,而 let ...

  9. BUUCTF[强网杯 2019]随便注(堆叠注入)

    记一道堆叠注入的题.也是刷BUU的第一道题. ?inject=1' 报错 ?inject=1'--+ //正常 存在注入的.正常查询字段数,字段数为2.在联合查询的时候给了新提示 ?inject=0' ...

  10. onethink-i春秋

    记一道onethink漏洞拿flag的题. 因为用户名长度被限制了,注册两个账号分别为 %0a$a=$_GET[a];// %0aecho `$a`;// #(%0a是换行符的urlencode) 点 ...