結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-03-13 20:39:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 951 bytes |
| コンパイル時間 | 194 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-10-15 10:47:44 |
| 合計ジャッジ時間 | 3,554 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 WA * 7 |
ソースコード
sb=list(input())
n=int(input())
sa=list(input())
if n==0 and sb!=sa:
print('SUCCESS')
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 sb.count('o')==1:
if n>=2:
print('FAILURE')
else:
if (sb==['o','x','x'] and sa==['x','x','o']) or (sa==['o','x','x'] and sb==['x','x','o']):
print('SUCCESS')
else:
print('FAILURE')
exit()
if sb.count('o')==2:
if sb==['o','o','x']:
if (n%2==1 and sa==['o','x','o']) or (n%2==0 and sa==['x','o','o']):
print('FAILURE')
else:
print('SUCCESS')
elif sb==['o','x','o']:
if (n%2==1 and sa==['x','o','o']) or (n%2==1 and sa==['o','o','x']) or(n%2==0 and sa==['o','x','o']):
print('FAILURE')
else:
print('SUCCESS')
else:
if (n%2==1 and sa==['o','x','o']) or (n%2==0 and sa==['o','o','x']):
print('FAILURE')
else:
print('SUCCESS')
あかりき