按题意直接模拟即可。

AC code:

#include <bits/stdc++.h>
using namespace std;

int main() {
    freopen ("a.in", "r", stdin);
    freopen ("a.out", "w", stdout);
    int T;
    cin >> T;
    while (T--) {
        int a, b, c;
        char op, eq;
        cin >> a >> op >> b >> eq >> c;
        if (a + b == c) {
            cout << "Right!" << endl;
        } else {
            cout << "Wrong!" << endl;
        }
    }
    fclose (stdin);
    fclose (stdout);
    return 0;
}