結果
問題 | No.2373 wa, wo, n |
ユーザー |
👑 |
提出日時 | 2023-07-15 22:05:34 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 551 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 06:50:22 |
合計ジャッジ時間 | 1,534 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 39 |
ソースコード
local n = io.read("*n", "*l")local s = io.read()-- w, aonlocal a1, a2 = false, truefor i = 1, n dolocal t1, t2 = false, falselocal b = s:sub(i, i)if b == "w" thenif a2 thent1 = trueendelseif b == "a" or b == "o" thenif a1 thent2 = trueendelseif b == "n" thenif a2 thent2 = trueendelseif b == "?" thenif a1 thent2 = trueendif a2 thent1, t2 = true, trueendelseprint("No") os.exit()enda1, a2 = t1, t2endprint(a2 and "Yes" or "No")