結果

問題 No.380 悪の台本
コンテスト
ユーザー kokoa1046
提出日時 2017-10-03 19:22:49
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 130 ms / 1,000 ms
+ 150µs
コード長 624 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 78 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2026-10-16 20:38:02
合計ジャッジ時間 1,765 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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