题解 | #司机写等式#

司机写等式

https://ac.nowcoder.com/acm/problem/14406

思路

开long long 就行了。

代码

#include<bits/stdc++.h>
#define inf 0x3f3f3f3f
#define int long long
using namespace std;
const int N=2e5+7;
const int mod=1e9+7;

//int read(){	int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-') f=f*-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;}
int gcd(int a,int b){
	return b?gcd(b,a%b):a;
}

int t,a,b,c,d;

signed main(){
	cin>>t;
	while(t--){
		cin>>a>>b>>c>>d;
		cout<<(a*b-c*d)<<"\n";
	}
	return 0;
}
全部评论

相关推荐

11-28 16:00
已编辑
武汉理工大学 Java
点赞 评论 收藏
分享
FFFoly:我也是,现在已经到了学长说的 能面试侃侃而谈的阶段了,但是已经没有公司给我面了
远程面试的尴尬瞬间
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务