結果

問題 No.380 悪の台本
ユーザー kokoa1046kokoa1046
提出日時 2017-10-03 19:22:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 198 ms / 1,000 ms
コード長 624 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 8,216 KB
最終ジャッジ日時 2023-08-10 05:34:31
合計ジャッジ時間 1,812 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,924 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 15 ms
7,744 KB
testcase_03 AC 14 ms
7,940 KB
testcase_04 AC 19 ms
7,904 KB
testcase_05 AC 36 ms
7,972 KB
testcase_06 AC 35 ms
7,980 KB
testcase_07 AC 198 ms
8,052 KB
testcase_08 AC 23 ms
8,216 KB
testcase_09 AC 21 ms
7,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
for line in sys.stdin:
    for i in range(4):
        if not line or line[-1].isalnum():
            break
        line = line[:-1]
    if line.startswith('digi '):
        ans = line.lower().endswith('nyo')
    elif line.startswith('petit '):
        ans = line.lower().endswith('nyu')
    elif line.startswith('rabi '):
        ans = any(map(lambda c: c.isalnum(), line[5:]))
    elif line.startswith('gema '):
        ans = line.lower().endswith('gema')
    elif line.startswith('piyo '):
        ans = line.lower().endswith('pyo')
    else:
        ans = False
    print(ans and 'CORRECT (maybe)' or 'WRONG!')
0