結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2017-06-25 16:05:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 1,000 ms |
コード長 | 721 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-20 03:52:33 |
合計ジャッジ時間 | 2,781 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
#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: if d==0 and N==1 and pa==1: print("SUCCESS") else: print ("FAILURE")