結果

問題 No.2312 Turtleman and Gaming Console
ユーザー gew1fw
提出日時 2025-06-12 16:24:02
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 428 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 65,408 KB
最終ジャッジ日時 2025-06-12 16:24:33
合計ジャッジ時間 3,188 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input().strip()
i = 0

# Extract N from the beginning of the string
while i < len(s) and s[i].isdigit():
    i += 1
n = int(s[:i])

# Extract A and B
a = s[i:i+n]
b = s[i+n:i+n+n]

# Check if there's any console that supports the game and is owned by Turtleman
found = False
for j in range(n):
    if a[j] == 'o' and b[j] == 'o':
        found = True
        break

print("Lucky Turtleman" if found else "Unlucky Turtleman")
0