結果

問題 No.380 悪の台本
ユーザー kokoa1046kokoa1046
提出日時 2017-10-03 19:22:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 216 ms / 1,000 ms
コード長 624 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-27 22:52:34
合計ジャッジ時間 1,749 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 28 ms
10,624 KB
testcase_02 AC 29 ms
10,624 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 32 ms
10,624 KB
testcase_05 AC 47 ms
10,624 KB
testcase_06 AC 49 ms
10,624 KB
testcase_07 AC 216 ms
10,624 KB
testcase_08 AC 39 ms
10,880 KB
testcase_09 AC 31 ms
10,752 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