結果

問題 No.233 めぐるはめぐる (3)
ユーザー htkbhtkb
提出日時 2018-05-01 11:45:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 645 ms / 1,000 ms
コード長 355 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 50,672 KB
最終ジャッジ日時 2023-09-10 08:38:18
合計ジャッジ時間 11,208 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 642 ms
50,544 KB
testcase_01 AC 559 ms
50,576 KB
testcase_02 AC 490 ms
50,484 KB
testcase_03 AC 575 ms
50,616 KB
testcase_04 AC 640 ms
50,672 KB
testcase_05 AC 637 ms
50,508 KB
testcase_06 AC 644 ms
50,604 KB
testcase_07 AC 645 ms
50,580 KB
testcase_08 AC 638 ms
50,528 KB
testcase_09 AC 424 ms
50,516 KB
testcase_10 AC 424 ms
50,556 KB
testcase_11 AC 426 ms
50,528 KB
testcase_12 AC 568 ms
50,520 KB
testcase_13 AC 643 ms
50,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
consonant = ["", "n", "b", "m", "g", "r"]
vowel = ["i", "a", "a", "e", "u", "u"]
name = set(
    [a+b+c+d+e+f+g+h+i+j+k+l
    for a, c, e, g, i, k in permutations(consonant)
    for b, d, f, h, j, l in permutations(vowel)])

name.difference_update([input() for _ in [0]*int(input())])
print(name.pop() if name else "NO")
0