题解: https://b1bznc26af6.feishu.cn/file/BMmWbumodokMN6x3NIEcvrelnib?from=from_copylink
网址:
https://cspjs.online/contest/680/problem/1
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("integer.in","r",stdin);
freopen("integer.out","w",stdout);
long long a,b,q;
cin>>a>>b>>q;
if(q==1)cout<<a/b;
else if(q==2){
if(a/b>=0)printf("%lld",a/b+(a%b==0?0:1));
else cout<<a/b;
}
else if(q==3){
if(a/b<0)printf("%lld",a/b+(a%b==0?0:-1));
else cout<<a/b;
}
else if(q==4){
cout<<fixed<<setprecision(0)<<a/b;
}
return 0;
}