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;
    }
    
    • 1

    정보

    ID
    737
    시간
    1000ms
    메모리
    256MiB
    난이도
    1
    태그
    (N/A)
    제출 기록
    134
    맞았습니다.
    54
    아이디