以下の内容はhttps://blog.hamayanhamayan.com/entry/2019/12/13/214141より取得しました。


Blackjack [AtCoder Beginner Contest 147 A]

https://atcoder.jp/contests/abc147/tasks/abc147_a

解説

https://atcoder.jp/contests/abc147/submissions/8892419

与えられた数値の総和を求めて22以上か、未満かを判定しよう。
配列で回してもいいし、個別に取ってきても良い。
どっちが書くの早いだろうか。

int A[3];
//---------------------------------------------------------------------------------------------------
void _main() {
    rep(i, 0, 3) cin >> A[i];

    int tot = 0;
    rep(i, 0, 3) tot += A[i];
    if (22 <= tot) cout << "bust" << endl;
    else cout << "win" << endl;
}



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

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