結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  yukiteru | 
| 提出日時 | 2018-02-02 16:45:32 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 811 bytes | 
| コンパイル時間 | 683 ms | 
| コンパイル使用メモリ | 81,756 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-28 18:53:14 | 
| 合計ジャッジ時間 | 1,713 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>
#include<list>
#include<bitset>
#include<functional>
#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000
using namespace std;
int main(void) {
	int a[6];
	int count = 0;
	FOR(i, 1, 5) {
		cin >> a[i];
		if (a[i] % 3 == 0) {
			if (a[i] % 5 == 0) {
				count += 8;
			}
			else {
				count += 4;
			}
		}
		else {
			if (a[i] % 5 == 0) {
				count += 4;
			}
			else {
				if (a[i] <= 9) {
					count++;
				}
				else if (a[i] <= 99) {
					count += 2;
				}
				else {
					count += 3;
				}
			}
		}
	}
	cout << count << endl;
	return 0;
}
            
            
            
        