結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-28 23:40:12 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 248 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2024-06-27 07:16:38 |
| 合計ジャッジ時間 | 1,793 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 35 WA * 8 |
ソースコード
s1 = raw_input()
N = int(raw_input()) % 4
s2 = raw_input()
S = set([s1])
while N:
nS = set([])
for s in S:
nS.add(s[0] + s[2] + s[1])
nS.add(s[1] + s[0] + s[2])
S = nS
N -= 1
print "FAILURE" if s2 in S else "SUCCESS"