結果

問題 No.24 数当てゲーム
ユーザー ryusukeryusuke
提出日時 2022-02-01 22:29:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-06-11 09:14:50
合計ジャッジ時間 1,232 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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