結果

問題 No.587 七対子
ユーザー むらため
提出日時 2018-12-18 06:09:39
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 3,457 ms
コンパイル使用メモリ 72,448 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 19:57:13
合計ジャッジ時間 4,355 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 36) Warning: imported and not used: 'math' [UnusedImport]
/home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #

import sequtils,strutils,algorithm,math,sugar,tables
let S = toSeq(stdin.readline.toCountTable().pairs).sorted((x,y)=>x[1]-y[1])
if S[^1][1] == 2 and S[0][1] == 1 and S[1][1] == 2 : echo S[0][0]
else: echo "Impossible"
0