結果

問題 No.2373 wa, wo, n
ユーザー はとはと
提出日時 2023-07-08 23:23:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 333 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,680 KB
最終ジャッジ日時 2023-09-30 01:46:46
合計ジャッジ時間 4,192 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,944 KB
testcase_01 AC 16 ms
7,872 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 15 ms
7,832 KB
testcase_06 AC 16 ms
7,824 KB
testcase_07 AC 16 ms
7,808 KB
testcase_08 AC 16 ms
7,804 KB
testcase_09 AC 15 ms
7,816 KB
testcase_10 AC 16 ms
7,796 KB
testcase_11 AC 16 ms
7,888 KB
testcase_12 AC 16 ms
7,832 KB
testcase_13 AC 15 ms
7,900 KB
testcase_14 AC 143 ms
8,620 KB
testcase_15 AC 39 ms
7,800 KB
testcase_16 AC 151 ms
8,516 KB
testcase_17 AC 56 ms
8,340 KB
testcase_18 AC 20 ms
7,828 KB
testcase_19 AC 16 ms
8,244 KB
testcase_20 AC 16 ms
8,592 KB
testcase_21 AC 16 ms
8,392 KB
testcase_22 AC 16 ms
8,492 KB
testcase_23 AC 17 ms
8,448 KB
testcase_24 AC 15 ms
7,824 KB
testcase_25 AC 16 ms
7,952 KB
testcase_26 AC 16 ms
7,980 KB
testcase_27 AC 16 ms
7,896 KB
testcase_28 AC 16 ms
7,780 KB
testcase_29 AC 16 ms
7,780 KB
testcase_30 AC 16 ms
7,796 KB
testcase_31 AC 16 ms
7,828 KB
testcase_32 AC 184 ms
8,640 KB
testcase_33 AC 17 ms
8,576 KB
testcase_34 AC 333 ms
8,680 KB
testcase_35 AC 16 ms
8,580 KB
testcase_36 AC 119 ms
8,476 KB
testcase_37 AC 54 ms
8,500 KB
testcase_38 AC 77 ms
8,476 KB
testcase_39 AC 316 ms
8,652 KB
testcase_40 AC 122 ms
8,560 KB
testcase_41 AC 129 ms
8,576 KB
testcase_42 AC 95 ms
8,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
i = 0
a =["wa","wo","n","w?","?a","?o","?"]
while i < N:
	if S[i:i+2]=="wa" or S[i:i+2]=="wo" or S[i:i+2]=="w?" or S[i:i+2]=="?a" or S[i:i+2]=="?o" :
		i = i +2
	elif S[i:i+1]=="n" or S[i:i+1]=="?":
		i =i +1
	else:
		print("No")
		break
if i == N:
	print("Yes")
0