結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2015-10-21 22:52:15 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-07-20 03:42:53 |
合計ジャッジ時間 | 1,857 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
bef = list(raw_input()) N = input() aft = list(raw_input()) if bef.count('x') != aft.count('x'): print 'SUCCESS' exit() if N == 0: possible = [bef] elif N == 1: possible = [[bef[1], bef[0], bef[2]], [bef[0], bef[2], bef[1] ]] elif N == 2: possible = [[bef[0], bef[1], bef[2]], [bef[1], bef[2], bef[0]], [bef[2], bef[0], bef[1]]] else: print 'FAILURE' exit() if aft in possible: print 'FAILURE' else: print 'SUCCESS'