結果

問題 No.637 X: Yet Another FizzBuzz Problem
コンテスト
ユーザー Haijinn
提出日時 2018-01-30 17:35:21
言語 C90(gcc15)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 346 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 153 ms
コンパイル使用メモリ 38,408 KB
最終ジャッジ日時 2026-02-24 00:53:04
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>
#include <math.h>
int main(void){
int i;
int a[5];
int c=0;
char s[4];
for(i=0;i<5;i++){
	
	
	scanf("%d",&a[i]);
	
	
}
for(i=0;i<5;i++){
if(a[i]%15==0){
	
	c+=8;
	
}else if(a[i]%3==0){
	c+=4;
	
	
}else if(a[i]%5==0){
	
	c+=4;
}else{
	sprintf(s,"%d",a[i]);
	c+=strlen(s);
	
}
}
printf("%d\n",c);
	return 0;
}
0