1 solutions

  • 0
    @ 2025-3-3 16:33:50

    C :

    #include<stdio.h>
    main(){
    	int a,b,m;
    	char c,d;
    	scanf("%d%c%d%c",&a,&c,&b,&d);
    	if(c=='+'&&d=='='){
    		m=a+b;
    	printf("%d\n",m);
    	}
    	
    }
    

    Python :

    
    str1=input()
    a=int(str1[:str1.find("+")])
    b=int(str1[str1.find("+")+1:-1])
    print(a+b)
    
    
    • 1

    Information

    ID
    10795
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By