結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-03-13 20:53:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 1,000 ms |
| コード長 | 1,219 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 81,968 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-10-15 10:59:44 |
| 合計ジャッジ時間 | 3,362 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 43 |
ソースコード
sb=list(input())
n=int(input())
sa=list(input())
if n==0:
if sb!=sa:
print('SUCCESS')
else:
print('FAILURE')
exit()
if sb.count('o')!=sa.count('o'):
print('SUCCESS')
exit()
if sb.count('o')==0 or sb.count('o')==3:
print('FAILURE')
exit()
if n>=2:
print('FAILURE')
exit()
if sb.count('o')==1:
if sb==['o','x','x']:
if (n==1 and sa==['o','x','x']) or (n==1 and sa==['x','o','x']):
print('FAILURE')
else:
print('SUCCESS')
elif sb==['x','o','x']:
if (n==1 and sa==['o','x','x']) or (n==1 and sa==['x','x','o']):
print('FAILURE')
else:
print('SUCCESS')
else:
if (n==1 and sa==['x','x','o']) or (n==1 and sa==['x','o','x']):
print('FAILURE')
else:
print('SUCCESS')
exit()
if sb.count('o')==2:
if sb==['o','o','x']:
if (n==1 and sa==['o','x','o']) or (n==1 and sa==['o','o','x']):
print('FAILURE')
else:
print('SUCCESS')
elif sb==['o','x','o']:
if (n==1 and sa==['o','o','x']) or (n==1 and sa==['x','o','o']):
print('FAILURE')
else:
print('SUCCESS')
else:
if (n==1 and sa==['o','x','o']) or (n==1 and sa==['x','o','o']):
print('FAILURE')
else:
print('SUCCESS')
あかりき