| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 40187 | Hyma | 不定方程求解 | C++ | Accepted | 0 MS | 244 KB | 322 | 2024-02-07 22:19:25 |
#include<iostream> using namespace std; int main(){ int a,b,c,x,y,s=0;//设一个a,b,c,x,y,和一个最开始为0的s。 cin>>a>>b>>c; for(x=0;x<=c/a;x++){//喧哗x=0,x小于等于c÷a,x不停的加。 y=(c-a*x)/b; if(a*x+b*y==c)s++;//如果若a×x+b×y=C,S不停的加。 } cout<<s; return 0; }