QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#125133#4964. Easy-to-Solve Expressions Amys4nCompile Error//C++14296b2023-07-16 02:54:012023-07-16 02:54:02

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-16 02:54:02]
  • 评测
  • [2023-07-16 02:54:01]
  • 提交

answer

#include <iostream>

using namespace std;

int main(){
    int a, b, c;
    cin >> a >> b >> c;

    if(a+b == c or a+c==b or b+c =a){
        cout << 1 << endl;
    } else if(a*b == c or a*c== b or b*c==a){
        cout << 2 << endl;
    } else{
        cout << 3 << endl;
    }
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:9:27: error: lvalue required as left operand of assignment
    9 |     if(a+b == c or a+c==b or b+c =a){
      |        ~~~~~~~~~~~~~~~~~~~^~~~~~