結果

問題 No.233 めぐるはめぐる (3)
ユーザー GuestGuest
提出日時 2019-07-19 14:53:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 527 ms / 1,000 ms
コード長 412 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 10,852 KB
実行使用メモリ 36,972 KB
最終ジャッジ日時 2023-08-26 21:17:21
合計ジャッジ時間 9,876 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 484 ms
34,936 KB
testcase_01 AC 422 ms
36,176 KB
testcase_02 AC 340 ms
25,732 KB
testcase_03 AC 425 ms
36,972 KB
testcase_04 AC 490 ms
35,512 KB
testcase_05 AC 491 ms
35,380 KB
testcase_06 AC 501 ms
35,196 KB
testcase_07 AC 527 ms
35,184 KB
testcase_08 AC 490 ms
35,196 KB
testcase_09 AC 298 ms
20,680 KB
testcase_10 AC 289 ms
20,720 KB
testcase_11 AC 269 ms
20,760 KB
testcase_12 AC 428 ms
36,448 KB
testcase_13 AC 486 ms
35,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

voewl=['i','a','a','e','u','u']
consonant=['','n','b','m','g','r']
vs = set(itertools.permutations(voewl))
cs = set(itertools.permutations(consonant))
sn=set()
all=set()

n=int(input())
for i in range(n):
  sn.add(input())

for i in vs:
  for j in cs:
    str=''
    for k in range(6):
      str = str+j[k]+i[k]
    all.add(str)

if len(all)==n:
  print('NO')
else:
  all-=sn
  print(all.pop())
0