結果

問題 No.587 七対子
ユーザー toshiro_yanagi
提出日時 2018-06-15 18:52:48
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 3,072 ms
コンパイル使用メモリ 62,156 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 19:53:55
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

import tables
var S = initCountTable[char]()

for s in stdin.readLine:
  S.inc s

if S.largest.val == 2:
  let ss = S.smallest
  if ss.val == 1:
    S.inc ss.key
    if S.smallest.val == 2:
      echo ss.key
      quit()

echo "Impossible"
0