結果

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

テストケース

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

ソースコード

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;
        }
    }

    cout << numOfEven << endl;

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

    return 0;
}
0