|
Description |
|
|
传说大家最喜欢找规律了是不是。 ^_^ 下表是 30个具有规律性的数字。
|
|
|
Input |
|
|
没有Input 。 |
|
|
Output |
|
|
从小到大输出所有存在规律的数字。 |
水题,之间看数字就能找到规律。。
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
for(int i = 10000;i<100000;i++)
{
int y = i%100;
int x = ((i/1000)%10)*((i/10000)%10);
if(x == y)
printf("%d\n",i);
}
return 0;
}
哈尔滨理工大学第四届ACM程序设计竞赛I: 真?找规律,布布扣,bubuko.com
原文:http://blog.csdn.net/libin56842/article/details/22689245