結果

問題 No.892 タピオカ
ユーザー f843nmfwisfeuwf843nmfwisfeuw
提出日時 2020-07-26 11:38:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 678 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 92,544 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 19:34:56
合計ジャッジ時間 1,390 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>

using namespace std;

bool isEven(int n) {
    return n % 2 == 0;
}

int main() {

    long A1, B1, A2, B2, A3, B3;
    cin >> A1 >> B1 >> A2 >> B2 >> A3 >> B3;

    int numOfEven = 0;

    vector<long> vs = {A1, A2, A3};


    for (long v : vs) {
        if (isEven(v)) {
            numOfEven += 1;
        }
    }

    if (numOfEven == 1 or numOfEven == 3) {
        cout << ":-)" << endl;
    } else {
        cout << ":-(" << endl;
    }

    return 0;
}
0