結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem | 
| コンテスト | |
| ユーザー |  Maeda | 
| 提出日時 | 2025-03-11 10:18:32 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 323 bytes | 
| コンパイル時間 | 422 ms | 
| コンパイル使用メモリ | 25,088 KB | 
| 実行使用メモリ | 7,328 KB | 
| 最終ジャッジ日時 | 2025-03-11 10:18:34 | 
| 合計ジャッジ時間 | 1,275 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | AC * 3 WA * 27 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |                 scanf("%d",&num);
      |                 ^~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
int main(void){
	int num = 0 ,ans = 0;
	for(int i = 0 ; i < 5 ; i++){
		scanf("%d",&num);
		if(i%3 == 0 && i%5 == 0){
			ans += 8;
		}else if(i%3 == 0 && i%5 != 0 || i%3 != 0 && i%5 == 0){
			ans += 4;
		}else{
			while(num!=0){
    			num = num / 10;
    			ans++;
			}
		}
	}    
	printf("%d",ans);
}
            
            
            
        