結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  sorag | 
| 提出日時 | 2022-08-16 22:38:41 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 609 bytes | 
| コンパイル時間 | 922 ms | 
| コンパイル使用メモリ | 80,128 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-03 16:18:20 | 
| 合計ジャッジ時間 | 2,253 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
    int cnt=0;
    for(int i=0;i<5;i++){
        int n;
        cin>>n;
        if(n%3==0 and n%5==0) cnt+=8;
        else if(n%3==0 and n%5!=0) cnt+=4;
        else if(n%3!=0 and n%5==0) cnt+=4;
        else  {
            string s;
            s=to_string(n);
            cnt+=s.size();
        }
    }
    cout<<cnt<<endl;
    return 0;
}
  
    
            
            
            
        