結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-03-13 20:46:24 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,409 bytes |
| 記録 | |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2026-05-04 04:50:50 |
| 合計ジャッジ時間 | 2,828 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 24 WA * 19 |
ソースコード
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 sb.count('o')==1:
if sb==['o','x','x']:
if (n%2==1 and sa==['x','o','x']) or (n%2==0 and sa==['x','x','o']) or (n%2==0 and sa==['o','x','x']):
print('FAILURE')
else:
print('SUCCESS')
elif sb==['x','o','x']:
if (n%2==1 and sa==['o','x','x']) or (n%2==1 and sa==['x','x','o']) or (n%2==0 and sa==['x','o','x']):
print('FAILURE')
else:
print('SUCCESS')
else:
if (n%2==1 and sa==['x','o','x']) or (n%2==0 and sa==['x','x','o']) or (n%2==0 and sa==['o','x','x']):
print('FAILURE')
else:
print('SUCCESS')
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']) or (n%2==0 and sa==['o','o','x']):
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']) or (n%2==0 and sa==['x','o','o']):
print('FAILURE')
else:
print('SUCCESS')
あかりき