結果

問題 No.182 新規性の虜
ユーザー sasa
提出日時 2025-03-05 15:32:27
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 22,784 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-03-05 15:32:30
合計ジャッジ時間 2,401 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 1 WA * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |                 scanf("%d",&p[i]);
      |                 ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
	int num = 0;
	int info[num];
	
	int *p = info;
	for(int i = 0;i < num;i++){
		scanf("%d",&p[i]);
	}
	
	int count = 0;
	for(int i = 0;i < num;i++){
		if (p[i] != p[i+1] && p[i] != p[i-1]){
			count++;
		}	
	}
	printf("%d",count);
}
0