結果
問題 |
No.182 新規性の虜
|
ユーザー |
![]() |
提出日時 | 2018-03-14 17:21:14 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 997 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 8,608 KB |
最終ジャッジ日時 | 2024-11-28 01:33:57 |
合計ジャッジ時間 | 62,307 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 19 TLE * 8 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:12:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%d",&a[i]); | ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { int n; int a[100000]; int i,j; int x=0,y=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(a[i]==a[j]){ x++; } } if(x==0){ y++; } x=0; } printf("%d\n",y); return 0; }