Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96897 王思颜 百钱买百鸡II C++ Runtime Error 0 MS 264 KB 375 2024-11-09 18:40:14

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,s = 1; cin>>n; for (int x = 0;x <= n / 5;x++){ for (int y = 0;y <= n / 3;y++){ for (int z = 0;z <= n / z;z++){ if(x+y+z == n && 5*x+3*y+z/3==n&&z%3==0){ cout<<s<<":"<<" "<<x<<","<<y<<","<<z<<endl; s++; } } } } if (s == 0){ cout<<"None"; } return 0; }


Run Info:

Runtime Error:Floating point exception