結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-09-02 14:07:23 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 306 bytes | 
| コンパイル時間 | 1,390 ms | 
| コンパイル使用メモリ | 160,248 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-15 07:15:17 | 
| 合計ジャッジ時間 | 2,468 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 30 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
    vector<int> a(5);
    for(int i=0;i<5;++i)cin>>a[i];
    int ans=0;
    for(int i=0;i<5;++i){
        int tmp=0;
        if((2-a[i]%3)/2)tmp+=4;
        if((4-a[i]%5)/4)tmp+=4;
        ans+=(tmp>0?tmp:log10(a[i])+1);
    }
    cout<<ans<<endl;
}
            
            
            
        