結果

問題 No.24 数当てゲーム
コンテスト
ユーザー ryusuke
提出日時 2022-02-01 22:29:37
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 421 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 128 ms
コンパイル使用メモリ 86,068 KB
実行使用メモリ 54,472 KB
最終ジャッジ日時 2026-03-04 11:18:45
合計ジャッジ時間 841 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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