結果

問題 No.653 E869120 and Lucky Numbers
ユーザー wagashi1349wagashi1349
提出日時 2018-04-24 16:56:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 607 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,864 KB
実行使用メモリ 8,284 KB
最終ジャッジ日時 2023-09-09 23:35:25
合計ジャッジ時間 2,278 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,272 KB
testcase_01 AC 16 ms
8,056 KB
testcase_02 AC 18 ms
8,140 KB
testcase_03 AC 19 ms
8,284 KB
testcase_04 AC 17 ms
8,212 KB
testcase_05 AC 16 ms
8,160 KB
testcase_06 AC 17 ms
7,868 KB
testcase_07 WA -
testcase_08 AC 19 ms
8,072 KB
testcase_09 AC 16 ms
7,868 KB
testcase_10 AC 16 ms
7,788 KB
testcase_11 AC 16 ms
7,796 KB
testcase_12 AC 16 ms
8,144 KB
testcase_13 AC 15 ms
7,868 KB
testcase_14 RE -
testcase_15 AC 16 ms
7,748 KB
testcase_16 AC 16 ms
7,932 KB
testcase_17 WA -
testcase_18 AC 16 ms
8,208 KB
testcase_19 WA -
testcase_20 AC 15 ms
8,132 KB
testcase_21 AC 16 ms
8,164 KB
testcase_22 AC 15 ms
8,116 KB
testcase_23 AC 15 ms
7,940 KB
testcase_24 AC 15 ms
8,204 KB
testcase_25 AC 16 ms
8,184 KB
testcase_26 AC 16 ms
8,184 KB
testcase_27 AC 16 ms
8,268 KB
testcase_28 AC 28 ms
8,172 KB
testcase_29 AC 29 ms
7,820 KB
testcase_30 WA -
testcase_31 AC 16 ms
8,204 KB
testcase_32 AC 16 ms
7,792 KB
testcase_33 AC 16 ms
7,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

str = input()
if len(str) == 1:
    print("No")
    exit(0)

a = int(str[0])
if a == 6 or a == 7:
    str = str[1:]
    while 1:
        a = int(str[0])
        if not(a == 6 or a == 7 or a == 8):
            str = "1" + str
            break
        str = str[1:]

if len(str) > 2:
    a = int(str[0] + str[1])
    if not (a >= 13 and a <= 15):
        print("No")
        exit(0)

for num in range(len(str)-2) :
    a = int("1" + str[num+1])
    if not (a >= 13 and a <= 15):
        print("No")
        exit(0)

a = int("1" + str[-1])
if not (a >= 12 and a <= 14):
    print("No")
else:
    print("Yes")
0