結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
umashika
|
| 提出日時 | 2016-02-02 01:20:04 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 29,636 KB |
| 最終ジャッジ日時 | 2026-02-23 20:28:08 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 23 TLE * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int n;
int a[100000];
int i,j;
int sum=0;
scanf("%d",&n);
for(i=0;i<n-1;i++){
for(j=i+1;j<n;j++){
if(a[i]!=a[j]){
sum++;
}
}
}
printf("%d\n",sum);
return 0;
}
umashika