#include<iostream>#include<cstdio>
using namespace std;intmain(){for(int i =10; i <=99; i ++){int a = i/10;int b = i%10;if(a*b+a+b == i) cout << i <<' ';}return0;}
有趣的自然数
#include<iostream>#include<cstdio>
using namespace std;intmain(){for(int i =1000; i <10000; i ++){int j = i%10*1000+ i/10%10*100+ i/100%10*10+ i/1000;if(i*(i/1000)== j){
cout << i << endl;}}return0;}
小虫爬墙
#include<iostream>#include<cstdio>
using namespace std;intmain(){int x, y;
cin >> x >> y;int h =0, t =0;while(true){
t ++, h += y;if(h >= x){
cout << t << endl;break;}
t ++, h --;}return0;}
鸡兔同笼
#include<iostream>#include<cstdio>
using namespace std;intmain(){for(int i =1; i <=98; i ++){for(int j =1; j <=98; j ++){if(i+j==98&& i*2+j*4==386){
cout << i <<','<< j << endl;}}}return0;}
马克思的数学题
#include<iostream>#include<cstdio>
using namespace std;intmain(){for(int i =1; i <=30; i ++){for(int j =1; j <=30; j ++){for(int k =1; k <=30; k ++){if(i+j+k==30&& i*3+j*2+k==50){
cout << i <<','<< j <<','<< k << endl;}}}}return0;}
巧数#include <iostream>#include <cstdio>using namespace std;int main() { for (int i = 10; i <= 99; i ++) { int a = i/10; int b = i%10; if (a*b+a+b == i) cout << i << ' '; } return 0;}有趣的自然数#include <iostream