結果
| 問題 | No.653 E869120 and Lucky Numbers |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-08-16 12:51:37 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 42 ms / 2,000 ms |
| + 573µs | |
| コード長 | 618 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 64,388 KB |
| 実行使用メモリ | 58,756 KB |
| 最終ジャッジ日時 | 2026-10-17 00:48:18 |
| 合計ジャッジ時間 | 3,705 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
def yes():
print("Yes")
exit()
def no():
print("No")
exit()
P = input()
N = len(P)
if N == 1:
no()
if int(P[N-1]) not in [2,3,4]:
no()
st = 0
for i in reversed(range(N-1)):
p = int(P[i])
if st == 0:
if p in [3,4,5]:
continue
elif p in [7,8]:
if i == 0:
yes()
st = 1
elif p == 1:
if i == 0:
yes()
else:
no()
else:
no()
else:
if p in [6,7]:
if i == 0:
yes()
else:
no()
no()
ntuda