結果

問題 No.197 手品
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-29 06:11:02
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 691 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 6,472 KB
実行使用メモリ 8,952 KB
最終ジャッジ日時 2023-09-09 16:04:17
合計ジャッジ時間 9,132 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
8,808 KB
testcase_01 AC 15 ms
8,856 KB
testcase_02 AC 14 ms
8,704 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 14 ms
8,804 KB
testcase_06 AC 714 ms
8,736 KB
testcase_07 AC 716 ms
8,692 KB
testcase_08 AC 15 ms
8,668 KB
testcase_09 AC 715 ms
8,896 KB
testcase_10 AC 15 ms
8,820 KB
testcase_11 AC 14 ms
8,708 KB
testcase_12 AC 14 ms
8,892 KB
testcase_13 AC 15 ms
8,856 KB
testcase_14 AC 15 ms
8,820 KB
testcase_15 AC 15 ms
8,652 KB
testcase_16 AC 15 ms
8,728 KB
testcase_17 AC 15 ms
8,804 KB
testcase_18 AC 15 ms
8,800 KB
testcase_19 AC 15 ms
8,696 KB
testcase_20 AC 15 ms
8,824 KB
testcase_21 AC 15 ms
8,752 KB
testcase_22 AC 15 ms
8,820 KB
testcase_23 AC 15 ms
8,628 KB
testcase_24 AC 15 ms
8,740 KB
testcase_25 AC 14 ms
8,820 KB
testcase_26 AC 715 ms
8,820 KB
testcase_27 AC 15 ms
8,724 KB
testcase_28 AC 15 ms
8,696 KB
testcase_29 AC 15 ms
8,752 KB
testcase_30 AC 715 ms
8,648 KB
testcase_31 AC 14 ms
8,744 KB
testcase_32 AC 715 ms
8,604 KB
testcase_33 AC 15 ms
8,688 KB
testcase_34 AC 716 ms
8,804 KB
testcase_35 AC 15 ms
8,608 KB
testcase_36 AC 14 ms
8,856 KB
testcase_37 AC 15 ms
8,712 KB
testcase_38 AC 15 ms
8,824 KB
testcase_39 AC 15 ms
8,808 KB
testcase_40 AC 716 ms
8,708 KB
testcase_41 AC 15 ms
8,728 KB
testcase_42 AC 15 ms
8,712 KB
testcase_43 WA -
testcase_44 AC 15 ms
8,816 KB
testcase_45 AC 15 ms
8,608 KB
testcase_46 AC 14 ms
8,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def nya(s0, s1, n):
    while 1:
        a, b, c = s0
        x, y, z = s1
        for _ in xrange(n):
            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 <= 1:
        return nya(s0, s1, n)
    else:
        return 0

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