結果
| 問題 | 
                            No.311 z in FizzBuzzString
                             | 
                    
| コンテスト | |
| ユーザー | 
                             spacenaut
                         | 
                    
| 提出日時 | 2016-05-15 19:44:29 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 139 bytes | 
| コンパイル時間 | 355 ms | 
| コンパイル使用メモリ | 20,480 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-24 21:40:41 | 
| 合計ジャッジ時間 | 621 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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 int *’ [-Wformat=]
    8 |         scanf("%d", &N);
      |                ~^   ~~
      |                 |   |
      |                 |   long int *
      |                 int *
      |                %ld
main.c:10:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   10 |         printf("%d", (N / 5 + N / 3) * 2);
      |                 ~^   ~~~~~~~~~~~~~~~~~~~
      |                  |                   |
      |                  int                 long 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(){
	long N = 0;
	long i;
	long cnt = 0;
	
	scanf("%d", &N);
	
	printf("%d", (N / 5 + N / 3) * 2);
	return 0;
}
            
            
            
        
            
spacenaut