結果
問題 | No.653 E869120 and Lucky Numbers |
ユーザー |
![]() |
提出日時 | 2018-02-23 23:33:53 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 711 bytes |
コンパイル時間 | 3,094 ms |
コンパイル使用メモリ | 65,164 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 18:16:32 |
合計ジャッジ時間 | 4,115 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]
ソースコード
import sequtils,strutils,unicodevarp = stdin.readlinef : boolF : bool = truek : intfor i,c in reversed(p):k = ord(c) - ord('0')if i == 0:if k in 2..4:f = trueelse:F = falseelse:if f:if k in 3..5:f = trueelif k in 7..8:f = falseelif k == 1 and i == p.high:f = falseF = trueelse:F = falseelse:if k in 6..7:discardelse:F = falseif F == false:breakif F and f == false:echo "Yes"else:echo "No"