結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-06-25 14:57:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 681 bytes |
| コンパイル時間 | 86 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-27 13:47:22 |
| 合計ジャッジ時間 | 2,655 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 24 WA * 19 |
ソースコード
#197magic
Sb=list(input())
N=int(input())
Sa=list(input())
ub=0
ua=0
pb=0
qb=0
pa=0
qa=0
for i in range(3):
if Sb[i]=="o":
Sb[i]=1
ub+=1
pb=i
else:
Sb[i]=0
qb=i
if Sa[i]=="o":
Sa[i]=1
ua+=1
pa=i
else:
Sa[i]=0
qa=i
if ub!=ua:
print("SUCCESS")
else:
if ub==0 or ub==3:
print("FAILURE")
else:
if ub==2:
pb=qb
pa=qa
d=pa-pb
if d<0:
d*=-1
if d>N:
print ("SUCCESS")
else:
if d%2==N%2:
print ("FAILURE")
else:
print ("SUCCESS")
rocoder