結果
問題 | No.587 七対子 |
ユーザー |
|
提出日時 | 2017-11-10 00:35:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-19 19:46:38 |
合計ジャッジ時間 | 2,248 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
text=input("") chars={} for i in range(13): char=text[i] if char in chars: chars[char]+=1 else: chars[char]=1 if len(chars)==7: one=0 result="" other=0 clist=chars.keys() for i,v in enumerate(chars): if chars[v]==1: one+=1 result=v elif chars[v]!=2: other+=1 if other!=0: result="Impossible" elif one!=1: resule="Impossible" else: result="Impossible" print(result)