C :
#include<stdio.h> main() { int a,b,c; for(a = 1;a<29;a++) { for(b = 1;b<29;b++) { for(c = 1;c<29;c++) { if(a+b+c == 30 && 3*a+2*b+c == 50) printf("%d,%d,%d\n",a,b,c); } } } return 0; }
By signing up a 算道OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 算道OJ universal account