結果

問題 No.24 数当てゲーム
ユーザー ryusukeryusuke
提出日時 2022-02-01 22:29:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 71,540 KB
最終ジャッジ日時 2023-09-02 02:36:23
合計ジャッジ時間 2,111 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,540 KB
testcase_01 AC 67 ms
71,400 KB
testcase_02 AC 67 ms
71,344 KB
testcase_03 AC 65 ms
71,316 KB
testcase_04 AC 71 ms
71,408 KB
testcase_05 AC 68 ms
71,308 KB
testcase_06 AC 67 ms
71,352 KB
testcase_07 AC 66 ms
71,244 KB
testcase_08 AC 68 ms
71,132 KB
testcase_09 AC 69 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

cnt = [0] * 10
correct = 0

for _ in range(int(input())):
    a, b, c, d, judge = input().split()
    a = int(a)
    b = int(b)
    c = int(c)
    d = int(d)
    
    if judge == 'YES':
        correct += 1
        cnt[a] += 1
        cnt[b] += 1
        cnt[c] += 1
        cnt[d] += 1
    elif judge == 'NO':
        cnt[a] -= 1
        cnt[b] -= 1
        cnt[c] -= 1
        cnt[d] -= 1    

print(cnt.index(correct))
0