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. vuejs第一集之:vuejs了解

    1,了解到前后端分离2,连接到vuejs3,搜集书籍: Vuejs前端开发基础与项目实战 (https://detail.tmall.com/item.htm?spm=a230r.1.14.107.6 ...

  2. ThinkPHP3.2.3 语言包切换中英文切换

    今天要用ThinkPHP3.2.3做一个小网站,其中涉及到切换中文与英文,通过查询手册和百度实现了该操作,现在将我具体的操作步骤记录下来,作为笔记和大家分享. php开发框架:ThinkPHP3.2. ...

  3. 开发工具IDE从入门到爱不释手(五)更多实用操作

    更多实用技巧 Tabs分屏和独立 日志链接及浏览器 设置浏览器 本地修改历史 三秒钟不操作,自动保存一个版本 右键--Local History--Show History 查看方法调用情况 按住方法 ...

  4. PostgreSQL数据库结构

    PG数据存储结构分为:逻辑结构和物理存储. 一.逻辑存储结构是:内部的组织和管理数据的方式[逻辑存储结构适用于不同的操作系统和硬件平台] 二.物理存储结构是:操作系统中组织和管理数据的方式. 1.逻辑 ...

  5. CentOS7安装桌面环境以及中文语言支持

    CentOS7 操作系统 http://public-yum.oracle.com/oracle-linux-isos.html ================================= 1 ...

  6. Maven之--安装nexus 私服

    开始搜索下载了,nexus3.19版本,下来之后,建立一个maven 骨架过程 quickstart,提示没有lgf4j依赖和和maven插件都没有,开始搜索什么原因,猜想是nexus没有索引,右搜索 ...

  7. 前端知识点--CSS overflow 属性

    问题:如何加滚动条? 给div 设置css 样式overflow:scroll div { width:150px; height:150px; overflow:scroll; } -------- ...

  8. 利用奇偶数来获取websocket推送时间间隔(或者比较前一个数和下一个数的变化)

    利用奇偶数来获取websocket推送时间间隔(或者比较前一个数和下一个数的变化) 在vue中的 data () {     return { countTime: 0,         newDat ...

  9. Qt+腾讯IM开发笔记(一):腾讯IM介绍、使用和Qt集成腾讯IM-SDK的工程模板Demo

    前言   开发一个支持全国的IM聊天,可以有基本的功能,发送文本.图片.文件等等相关内容.   腾讯IM产品 概述   腾讯即时通信IM是腾讯推出的即时聊天程序,当前时间为2020年3月(腾讯IM的优 ...

  10. Prometheus + Alertmanager 实现企微告警

    上一篇:二进制安装Prometheus  下面准备在监控的流程中呈现到告警到企微 查看企业ID,用于后续配置文件 四.安装Alertmanager1.准备安装的包 --选择上面链接给的Linux的ta ...