結果

問題 No.653 E869120 and Lucky Numbers
ユーザー skii
提出日時 2018-02-24 09:58:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-13 18:18:00
合計ジャッジ時間 2,142 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
r = 'No'
if s[-1] in '234':
    for i in range(len(s)-1)[::-1]:
        if s[i] not in '345':
            break
    if (i==0 and s[i]=='1') or s[i] in '87' and all(d in '67' for d in s[:i]):
        r = 'Yes'
print(r)
0