結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,672 KB
testcase_01 AC 14 ms
8,828 KB
testcase_02 AC 15 ms
8,896 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 15 ms
8,692 KB
testcase_06 AC 716 ms
8,872 KB
testcase_07 AC 715 ms
8,840 KB
testcase_08 AC 15 ms
8,660 KB
testcase_09 AC 14 ms
8,672 KB
testcase_10 AC 14 ms
8,612 KB
testcase_11 AC 15 ms
8,732 KB
testcase_12 AC 14 ms
8,640 KB
testcase_13 AC 14 ms
8,832 KB
testcase_14 AC 14 ms
8,728 KB
testcase_15 AC 14 ms
8,676 KB
testcase_16 AC 15 ms
8,728 KB
testcase_17 AC 15 ms
8,640 KB
testcase_18 AC 15 ms
8,664 KB
testcase_19 AC 15 ms
8,860 KB
testcase_20 AC 15 ms
8,672 KB
testcase_21 AC 15 ms
8,664 KB
testcase_22 AC 15 ms
8,880 KB
testcase_23 AC 15 ms
8,664 KB
testcase_24 AC 15 ms
8,832 KB
testcase_25 AC 14 ms
8,832 KB
testcase_26 AC 715 ms
8,720 KB
testcase_27 AC 14 ms
8,920 KB
testcase_28 AC 15 ms
8,612 KB
testcase_29 AC 15 ms
8,920 KB
testcase_30 AC 715 ms
8,728 KB
testcase_31 AC 15 ms
8,732 KB
testcase_32 AC 14 ms
8,760 KB
testcase_33 AC 15 ms
8,728 KB
testcase_34 AC 715 ms
8,720 KB
testcase_35 AC 15 ms
8,832 KB
testcase_36 AC 14 ms
8,756 KB
testcase_37 AC 14 ms
8,672 KB
testcase_38 AC 14 ms
8,636 KB
testcase_39 AC 15 ms
8,732 KB
testcase_40 AC 715 ms
8,616 KB
testcase_41 AC 15 ms
8,808 KB
testcase_42 AC 15 ms
8,724 KB
testcase_43 WA -
testcase_44 AC 14 ms
8,640 KB
testcase_45 AC 15 ms
8,748 KB
testcase_46 AC 15 ms
8,872 KB
権限があれば一括ダウンロードができます

ソースコード

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