結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2015-08-28 14:40:22 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 662 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 13:04:18 |
合計ジャッジ時間 | 2,275 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 20 WA * 23 |
ソースコード
sb = raw_input() N = input() sa = raw_input() bc = sb.count("o") ac = sa.count("o") if bc != ac: print "SUCCESS" elif bc == 0 or bc == 3: print "FAILURE" else: if bc == 1: b = sb.index("o") a = sa.index("o") else: b = sb.index("x") a = sa.index("x") if N < 2: print "FAILURE" if N == abs(a-b) else "SUCCESS" else: print "FAILURE" if abs(a-b)^1 == N^1 else "SUCCESS"