Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7174 李成蹊 不定方程求解 C++ 通过 0 MS 248 KB 230 2023-02-01 14:34:35

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,p,t; cin>>a>>b>>c; p=c/a; t=0; int y=0; for(int x=0;x<=p;x++){ y=(c-a*x)/b; if(a*x+b*y==c){ t+=1; } } cout<<t; return 0; }


测评信息: