1 solutions

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

    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);
    	}
    	
    }
    

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int a,b;
    	long long e;
    	char c,d;
    	cin>>a>>c>>b>>d;
    	e=a*b;
    	cout<<e<<endl; 
    
    	return 0;
    }
    
    

    Python :

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

    Information

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