Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6994 黄宜洋 百钱买百鸡II C++ Wrong Answer 1 MS 252 KB 584 2025-03-29 15:23:49

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,c=1; cin>>n; for(int x=0;x<=n;x++){ for(int y=0;y<=n;y++){ for(int z=0;z<=n;z++){ if(x+y+z==n && 5*x+3*y+(1/3)*z==n){ printf("%d:%d,%d,%d\n",c,x,y,z); c++; } } } } return 0; }


Run Info:

------Input------
100
------Answer-----
1: 0,25,75 2: 4,18,78 3: 8,11,81 4: 12,4,84
------Your output-----
1:2,30,68 2:5,25,70 3:8,20,72 4:11,15,74 5:14,10,76 6:17,5,78 7:20,0,80