結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-01-02 13:49:54 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 563 bytes | 
| コンパイル時間 | 1,859 ms | 
| コンパイル使用メモリ | 169,444 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-19 05:23:10 | 
| 合計ジャッジ時間 | 2,901 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include <bits/stdc++.h>
#define REP(i ,n) for(int i=0 ;i < n; i++)
#define REPB(i ,n) for(int i=n; i >= 0; i--)
#define FOR(i ,m ,n) for(int i=m; i < n; i++)
#define FORB(i, m, n) for(int i=m; i>= m; i--)
#define ll long long
#define pb push_back
#define popb pop_back
using namespace std;
int main(){
  int a;
  int ans = 0;
  string as;
  REP(i, 5){
      cin >> a;
      as = to_string(a);
      if(a % 15 == 0) ans += 8;
      else if(a % 3 == 0 || a % 5 == 0) ans += 4;
      else ans+= as.size();
    }
    cout << ans << endl;
}
            
            
            
        