結果
| 問題 | 
                            No.637 X: Yet Another FizzBuzz Problem
                             | 
                    
| コンテスト | |
| ユーザー | 
                             TangentDay
                         | 
                    
| 提出日時 | 2018-01-26 23:08:40 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,000 bytes | 
| コンパイル時間 | 542 ms | 
| コンパイル使用メモリ | 81,964 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-28 18:49:29 | 
| 合計ジャッジ時間 | 1,330 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <array>
#include <bitset>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<double> VD;
int calc(int x){
    bool t = (x % 3 == 0);
    bool f = (x % 5 == 0);
    if (t && f) return 8;
    if (t) return 4;
    if (f) return 4;
    if (x < 10) return 1;
    if (x < 100) return 2;
    return 3;
}
int main() {
    int a = 0;
    REP(i,5){
        int x;
        cin >> x;
        a += calc(x);
    }
    cout << a << endl;
    return 0;
}
            
            
            
        
            
TangentDay