結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー Eclair1015
提出日時 2018-05-06 10:13:10
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 02:05:36
合計ジャッジ時間 1,290 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int counting(int num);

int main(){
	int i;
	int a[5];
	int total=0,new;
	
	for(i=0;i<5;i++){
		if(scanf("%d",&a[i]));
	}
	
	for(i=0;i<5;i++){
		if(a[i]%5==0 &&a[i]%3==0){
			total+=8;
		}else if(a[i]%3==0 || a[i]%5==0){
			total+=4;
		}else{
			new=counting(a[i]);
			total+=new;
		}
	}
	
	printf("%d",total);
	return 0;
}

int counting(int num){
	
	int i;
	for(i=1;num<0;i++){
		num=num/10;
	}
	return i;
}
0