1 条题解

  • 2
    @ 2023-12-28 20:27:42

    链接:http://czoj.com.cn/p/P1736 四个注意:

    • 两位数

    • 加法

    • 不能进位

    • 输入要空格 你觉得我会告诉你我栽在这一点上两次了吗

      好了开始代码

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);//加速 
    int numa,numb;
    char ch;
    scanf("%d %c %d",&numa,&ch,&numb);//这TM要空格我真的服了 
    if(numa>=100||numb>=100||ch!='+'||numa%10+numb%10>=10||(numa/10)%10+(numb/10)%10>=10) printf("PR!");//add不出来输出PR! 
    else cout<<numa+numb;//不然输出numa+numb 
    	return 0;
    }
    

    信息

    ID
    737
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    134
    已通过
    54
    上传者