public class Main {
public static void main(String[] args) {
int a, b, c;
for (a = 0; a < 400; a++) {
for (b = 0; b < 400; b++) {
for (c = 0; c < 400; c++) {
if (a * 2 == b * 3 && b * 3 == c * 4 && a + b + 2 * c == 400) {
System.out.println(a);
System.out.println(b);
System.out.println(c);
break;
}
}
}
}
}
}
#include<stdio.h>
int main()
{
int a;
int b;
int c=1;
while(1)
{
if(2c+c4/3+2c==400)
{
break;
}
else
{
c++;
}
}
printf("○=%d △=%d □=%d",2c,c*4/3,c);
return 0;
}
这个是c的,改改就行