結果

問題 No.197 手品
ユーザー yuppe19 😺
提出日時 2015-04-29 06:16:23
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 680 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 7,296 KB
最終ジャッジ日時 2024-06-27 08:48:35
合計ジャッジ時間 6,202 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 40 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from random import randint
from datetime import datetime
start = datetime.now()

def nya(s0, s1):
    while 1:
        a, b, c = s0
        x, y, z = s1
        if randint(0, 1):
            b, a = a, b
        else:
            c, b = b, c
        if (a, b, c) == (x, y, z):
            return 0
        now = datetime.now()
        if (now - start).total_seconds() >= .7:
            break
    return 1

def fushigi(s0, s1, n):
    if n == 0:
        return s0 != s1
    if n == 1:
        return nya(s0, s1)
    else:
        return 0

s0 = raw_input()
n = int(raw_input())
s1 = raw_input()
if fushigi(s0, s1, n):
    print 'SUCCESS'
else:
    print 'FAILURE'
0