#53831: WA 80% 救我


chbel5460@gmail.com (玲君陳)

學校 : 臺北市私立復興實驗高級中學
編號 : 276052
來源 : [61.228.75.221]
最後登入時間 :
2025-09-01 21:49:02

// Online C++ Compiler - Build, Compile and Run your C++ programs online in your favorite browser

#include<iostream>
#include <cmath>
using namespace std;

int main()
{
    long long int a,b,c,t=0;
    string d[5];
    cin>>a>>b>>c;
    if(a+b==c){
      d[t]="+";
      t++;
    }if(a-b==c){
      d[t]="-";
      t++;
    }if(a*b==c){
      d[t]="*";
      t++;
    }if(b!=0&&a/b==c){
      d[t]="/";
      t++;
    }if((long long)pow(a,b)==c){
      d[t]="**";
      t++;
    }for(int i=0;i<t;i++){
      if(i<t-1){
        cout<<d[i]<<endl;}
        else{
          cout<<d[i];
        }
      
    }
    return 0;
}