結果

問題 No.191 供託金
ユーザー yozayoza
提出日時 2015-04-26 18:47:43
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 3,191 ms
コンパイル使用メモリ 65,280 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-29 01:51:41
合計ジャッジ時間 4,162 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, algorithm, math

discard readLine(stdin).parseInt

let
  cSeq = readLine(stdin).split(' ').map(parseInt)
  border = cSeq.sum div 10
  result = 30 * cSeq.map(proc (c: int): int =
    if c <= border: 1
    else: 0
  ).sum

echo(result)
0