求大佬解答!

P5709 【深基2.习6】Apples Prologue / 苹果和虫子

哥,程序是顺序结构 他会先运行前面的 你放后面它会先运行a=s/t 不炸才怪 ```cpp #include<bits/stdc++.h> using namespace std; int main(){ int m,t,s; cin>>m>>t>>s; if(t==0){ cout<<0; return 0;} int a=s/t; if(s%t!=0){ a++;} if(m-a<0){ cout<<0;} else cout<<m-a; } ```
by z_z_b_ @ 2024-03-11 21:46:56


@[z_z_b](/user/956129) 谢了
by zouxuzhe @ 2024-03-12 17:52:28


|