結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー ilplrr
提出日時 2018-02-18 15:54:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 58,340 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 12:59:51
合計ジャッジ時間 1,407 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int a[5];
    for (auto& x : a) cin >> x;

    int ans = 0;
    for (auto x : a) {
        if (!(x % 3)) ans += 4;
        if (!(x % 5)) ans += 4;
        if (x % 3 and x % 5) ans++;
    }

    cout << ans << endl;

    return 0;
}
0