以下の内容はhttps://blog.hamayanhamayan.com/entry/2019/10/27/233410_1より取得しました。


9x9 [AtCoder Beginner Contest 144 A]

https://atcoder.jp/contests/abc144/tasks/abc144_a

解説

https://atcoder.jp/contests/abc144/submissions/8153919

A,Bのどちらかが10以上なら計算できないので-1
そうでないならできるので、A*Bを答える。

int A, B;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> A >> B;
    int ans = A * B;
    if (10 <= A or 10 <= B) ans = -1;
    cout << ans << endl;
}



以上の内容はhttps://blog.hamayanhamayan.com/entry/2019/10/27/233410_1より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14