結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー nao109
提出日時 2021-08-28 02:37:18
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 322 bytes
コンパイル時間 1,191 ms
コンパイル使用メモリ 158,548 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-21 10:28:07
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,ans=0;
    for(int i=0; i<5; i++){
        cin >> a;
        if(a%3!=0&&a%5!=0){
            ans++;
            if(a>=10) ans++;
            if(a>=100) ans++;
        }
        if(a%3==0) ans+=4;
        if(a%5==0) ans+=4;
    }
    cout << ans << endl;
}
0