結果

問題 No.24 数当てゲーム
ユーザー Shunya SeiyaShunya Seiya
提出日時 2017-03-01 01:29:39
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 616 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 6,716 KB
実行使用メモリ 6,064 KB
最終ジャッジ日時 2023-09-02 18:24:54
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,880 KB
testcase_01 AC 11 ms
5,928 KB
testcase_02 AC 11 ms
6,064 KB
testcase_03 AC 11 ms
5,828 KB
testcase_04 AC 11 ms
6,064 KB
testcase_05 AC 11 ms
5,900 KB
testcase_06 AC 11 ms
5,948 KB
testcase_07 AC 11 ms
5,928 KB
testcase_08 AC 11 ms
5,888 KB
testcase_09 AC 11 ms
5,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# 標準入力から一行分を読み出し、文字列として格納する。
input_N = int(raw_input())

number_list = [0,0,0,0,0,0,0,0,0,0]

for i in range(input_N):
	# 読み込んだ文字列をスペースで分割する
	split_first = raw_input().split()

	A = int(split_first[0])
	B = int(split_first[1])
	C = int(split_first[2])
	D = int(split_first[3])
	R = str(split_first[4])

	if R=="YES":
		FLAG=1
	if R=="NO":
		FLAG=-1

	number_list[A]+=FLAG
	number_list[B]+=FLAG
	number_list[C]+=FLAG
	number_list[D]+=FLAG

print number_list.index(max(number_list))
0