1 条题解
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ //freopen("5.in","r",stdin); //freopen("5.out","w",stdout); int a,b,c,jsq=0; cin>>a>>b>>c; for(int x=0;x<=c;x++){ if((c-a*x)%b==0) { //cout<<x<<","<<(c-a*x)/b<<endl; if((c-a*x)/b>=0) jsq++; } } cout<<jsq<<endl; }
- 1
信息
- ID
- 3875
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者