よじろめ覚書

私の理解度重視のソースコードです。

ABC144A - 9x9

問題:A - 9x9

#include <iostream>
using namespace std;

int main(void) {
    int a, b;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> a >> b;
    if (9 < a || 9 < b) {
        cout << -1 << "\n";
    } else {
        cout << a * b << "\n";
    }

    return 0;
}