結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  tokizo | 
| 提出日時 | 2018-01-28 00:46:55 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 549 bytes | 
| コンパイル時間 | 1,529 ms | 
| コンパイル使用メモリ | 166,776 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-28 18:51:07 | 
| 合計ジャッジ時間 | 2,212 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include <math.h>
#include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
struct omt{omt(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int getDigit(int x){
    return to_string(x).size();
}
int main(){
    int tmp, cnt = 0;
    REP(i, 5){
        cin >> tmp;
        if(tmp % 3 == 0) cnt += 4;
        if(tmp % 5 == 0) cnt += 4;
        if(tmp % 3 != 0 and tmp % 5 != 0) cnt += getDigit(tmp);
    }
    cout << cnt << endl;
    return 0;
}
            
            
            
        