結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
tsukacchan
|
| 提出日時 | 2016-03-23 13:18:53 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 467 bytes |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 19:28:39 |
| 合計ジャッジ時間 | 894 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:14:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%d",&N);
| ^~~~~~~~~~~~~~
main.c:18:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
18 | scanf("%d%d%d%d",&A,&B,&C,&D);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:19:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
19 | scanf("%s",R);
| ^~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(void){
int i,N;
int A,B,C,D;
int Number[10];
char R[3];
for(i=0;i<10;i++)
Number[i]=0;
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%d%d%d%d",&A,&B,&C,&D);
scanf("%s",R);
if(strcmp(R,"YES")==0){
Number[A]++;
Number[B]++;
Number[C]++;
Number[D]++;
}
else if(strcmp(R,"NO")==0){
Number[A]=0;
Number[B]=0;
Number[C]=0;
Number[D]=0;
}
}
for(i=0;i<10;i++){
if(Number[i]==2)
printf("%d",i);
}
return 0;
}
tsukacchan