I ACed this problem,but I have a problem
  • 板块灌水区
  • 楼主xiao999yao
  • 当前回复26
  • 已保存回复26
  • 发布时间2024/7/31 13:06
  • 上次更新2024/7/31 14:33:22
查看原帖
I ACed this problem,but I have a problem
1062722
xiao999yao楼主2024/7/31 13:06

P1421

rt

This is my code before:(language is C++)

#include<bits/stdc++.h>
#define int long long
using namespace std;
int a,b;
signed main(){
	cin>>a>>b;
	cout<<int((a+b*0.1)/1.9);
	return 0;
}

GCC says: "#define int long long is wrong" But I think int and long long is not wrong.

This is my AC code(language is C++ to):

#include<bits/stdc++.h>
//#define int long long
using namespace std;
int a,b;
signed main(){
	cin>>a>>b;
	cout<<int((a+b*0.1)/1.9);
	return 0;
}

Thank for your help!!!

2024/7/31 13:06
加载中...