結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2015-10-12 15:59:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 1,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 118 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-20 03:42:51 |
合計ジャッジ時間 | 3,079 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
S_b = [c for c in input()] N = int(input()) S_a = [c for c in input()] o_b = S_b.count('o') o_a = S_a.count('o') if o_b!=o_a: print('SUCCESS') exit() if o_b==0 or o_b == 3: print('FAILURE') exit() t = 'o' if o_b == 2: t = 'x' d = abs(S_b.index(t) - S_a.index(t)) if N == 0: if S_b != S_a: print('SUCCESS') else: print('FAILURE') elif N == 1: if d == 2 or (d==0 and S_b.index(t)==1): print('SUCCESS') else: print('FAILURE') else: print('FAILURE')