202,200,229 guess the age of the (fill in the blank enumeration)

Title: Guess Age

    小明带两个妹妹参加元宵灯会。别人问她们多大了,她们调皮地说:“我们俩的年龄之积是年龄之和的6倍”。小明又补充说:“她们可不是双胞胎,年龄差肯定也不超过8岁啊。”

    请你写出:小明的较小的妹妹的年龄。

Note: write only a person's age, number, please submit your answers via the browser. Do not write any extra content.

#include <bits/stdc++.h>
using namespace std;
int main(){
	for(int i=1;i<=100;i++){
		for(int j=i;j<=100;j++){
			if((i*j)==(i+j)*6&&(j-i)<=8&&(j!=i))
				printf("%d %d",i,j);
		}
	}
	return 0;
} 

So Xiao Ming smaller sister 10 years old.

Published 37 original articles · won praise 0 · Views 388

Guess you like

Origin blog.csdn.net/weixin_45351699/article/details/104602180