結果

問題 No.24 数当てゲーム
ユーザー zect518zect518
提出日時 2018-05-27 13:08:55
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 28,532 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-11 03:54:57
合計ジャッジ時間 1,017 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 0 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 0 ms
4,380 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>

int main(){
	int i,s,tarn,num[10]={1,1,1,1,1,1,1,1,1,1};
	int ans[4];
	char tf[20],yes[20]="YES";
	setvbuf(stdout,NULL,_IONBF,0);
	scanf("%d",&tarn);
	for(s=0;s<tarn;s++){
		for(i=0;i<4;i++){scanf("%d",&ans[i]);}
		scanf("%s",tf);
		if(strcmp(tf,yes)==0){//yesの場合、ans以外の数字を0に
			for(i=0;i<10;i++){
				if(i!=ans[0]&&i!=ans[1]&&i!=ans[2]&&i!=ans[3])num[i]=0;
			}
		}
		else for(i=0;i<4;i++){//noの場合、ansの数字を0に
			num[ans[i]]==0;
		}

	}for(i=0;i<10;i++)//1のままの数字を出力
		if(num[i]==1)printf("%d",i);
}
0