結果
問題 |
No.380 悪の台本
|
ユーザー |
|
提出日時 | 2016-07-05 17:58:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 244 ms / 1,000 ms |
コード長 | 658 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-06 23:03:31 |
合計ジャッジ時間 | 1,585 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
#!/usr/bin/env python3 import sys import re 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!')