結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-03 14:19:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 486 bytes |
| 記録 | |
| コンパイル時間 | 716 ms |
| コンパイル使用メモリ | 81,928 KB |
| 実行使用メモリ | 53,808 KB |
| 最終ジャッジ日時 | 2025-12-03 14:19:37 |
| 合計ジャッジ時間 | 3,057 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 41 WA * 2 |
ソースコード
import sys
def input(): return sys.stdin.readline().rstrip('\n')
def main():
s = input()
n = int(input())
t = input()
if (n == 0 and s != t) or s.count('o') != t.count('o'):
return 'SUCCESS'
if s.count('o') in [0, 3]:
return 'FAILURE'
targ = 'o' if s.count('o') == 1 else 'x'
return 'SUCCESS' if abs(s.find(targ)-t.find(targ)) > n else 'FAILURE'
if __name__ == '__main__':
ret = main()
if ret is not None:
print(ret)