結果
| 問題 | 
                            No.311 z in FizzBuzzString
                             | 
                    
| コンテスト | |
| ユーザー | 
                             spacenaut
                         | 
                    
| 提出日時 | 2016-05-15 19:50:28 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 178 bytes | 
| コンパイル時間 | 386 ms | 
| コンパイル使用メモリ | 20,480 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-24 21:40:57 | 
| 合計ジャッジ時間 | 666 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 7 WA * 4 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long unsigned int *’ [-Wformat=]
    8 |         scanf("%d", &N);
      |                ~^   ~~
      |                 |   |
      |                 |   long unsigned int *
      |                 int *
      |                %ld
main.c:11:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
   11 |         printf("%d", cnt);
      |                 ~^   ~~~
      |                  |   |
      |                  int long unsigned int
      |                 %ld
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%d", &N);
      |         ^~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
int main(){
	unsigned long N = 0;
	unsigned long i;
	unsigned long cnt = 0;
	
	scanf("%d", &N);
	cnt = (N / 5 + N / 3) * 2;
	
	printf("%d", cnt);
	return 0;
}
            
            
            
        
            
spacenaut