数据过水
查看原帖
数据过水
941357
student_of_syp楼主2024/10/17 17:19

没判答案小于0的情况没判还AC了

#include<bits/stdc++.h>
#define int long long
using namespace std;
int a,b,c;
signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin>>a>>b>>c;
	cout<<(3*a+b-c+2)/3;
	cout.flush();
	return 0;
}

例如0 62 89这个程序就输出了-8,这显然不太合适。

2024/10/17 17:19
加载中...