基础练习 回文数
来源:互联网 发布:国家会对网络监控吗 编辑:程序博客网 时间:2024/05/27 14:14
基础练习 回文数
时间限制:1.0s 内存限制:512.0MB
问题描述
1221是一个非常特殊的数,它从左边读和从右边读是一样的,编程求所有这样的四位十进制数。
输出格式
按从小到大的顺序输出满足条件的四位十进制数。
#include<iostream>using namespace std;int main(){int a;for(a=1000;a<10000;a++){if(a/1000==a%10&&(a/10)%10==(a/100)%10)cout<<a<<endl;}return 0;}
阅读全文
1 0
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 基础练习 回文数
- 智能点餐+跨界娱乐+互动营销+移动支付=智慧餐桌
- whois服务器
- poj2976 Dropping tests(二分法:最大化平均值)
- HBase性能调优<转>
- 【工具】文档编辑器
- 基础练习 回文数
- Redis 集成Spring(spring-data-redis)
- MySQL 数据库性能优化之索引优化
- GCC 中 undefined reference to ‘ceil’ collect2:ld returned 1 exit status 错误
- Matlab 跨空间变量传递和赋值
- MySQL中tinytext、text、mediumtext和longtext详解
- F
- KNN(K-NearestNeighbor)算法
- http请求方法与状态码