結果

問題 No.29 パワーアップ
コンテスト
ユーザー kou_kkk
提出日時 2023-08-24 08:24:03
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 4,113 ms
コンパイル使用メモリ 72,892 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-24 21:19:50
合計ジャッジ時間 4,817 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strutils, tables

let
  n = parseInt readLine stdin
  abcs = concat n.newSeqWith stdin.readLine.split.map parseInt
var
  cntT = abcs.toCountTable
  cnt = [0, 0]

for i in 1 .. 10:
  cnt = [cnt[0] + cntT[i] div 2, cnt[1] + cntT[i] mod 2]

echo cnt[0] + cnt[1] div 4
0