結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー hogethoget
提出日時 2018-01-26 23:16:11
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 1,051 bytes
コンパイル時間 1,602 ms
コンパイル使用メモリ 157,828 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 18:49:33
合計ジャッジ時間 1,822 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define in(x,y,h,w) x >= 0 && x < h && y >= 0 && y < w

#define int long long
//typedef    long long          ll;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      P;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
 
const int INF=1e+18;
const double EPS=1e-9;
const int MOD=1000000007;
 
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

signed main(){
	int ans = 0;
	for(int i = 0;i < 5;i++){
		int keta = 0,n,tmp;
		cin >> n;
		tmp = n;
		while(tmp){
			tmp /= 10;
			keta++;
		}
		if(n % 3 == 0) ans += 4;
		if(n % 5 == 0) ans += 4;
		if(n % 3 && n % 5) ans += keta;
	}
	cout << ans << endl;
	return 0;
}
0