1.无限制
十分简单,只需输入 后输出 即可。
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%d",a+b);
return 0;
}2.‘+’被抠掉了
简单,把+换成两个-就行了
#include <cstdio>
using namespace std;
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%d",a-(-b));
return 0;
}(注意头文件也不能用万能头)
3.‘-’ ‘*’ ‘/’ ‘^’也被抠了
不要慌,别忘了我们还有移位!!
#include<cstdio>
#include<cmath>
#define int long long
using namespace std;
signed main()
{
int a,b,cnt=1;
scanf("%lld%lld",&a,&b);
cnt=cnt<<a;
cnt=cnt<<b;
printf("%lld",(int)log2(cnt));
return 0;
}( 需要小于32)
后记
如果数据较小(如 )其实可以打表 : )