#include<stdio.h>void main (){int x , y , z ;float n ;while ( scanf ( "%f" , & n ) != EOF ){ for ( x = 0 ; x <= n / 5 ; x ++ )for ( y = 0 ; y <= n / 3 ; y ++ )for ( z = 0 ; z <= 3 * n ; z ++ )if (( x + y + z == 100 ) && ( 15 * x + 9 * y + z <= 3 * n ))printf ( "x=%d,y=%d,z=%d \n " , x , y , z );}}
题目1045:百鸡问题
最新推荐文章于 2022-03-22 16:04:30 发布