結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2022-10-17 19:41:33 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 202 bytes |
コンパイル時間 | 4,254 ms |
コンパイル使用メモリ | 65,680 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-28 09:35:19 |
合計ジャッジ時間 | 5,410 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import algorithm,sequtils,strutilsvar n = parseInt readLine stdinvar a = stdin.readLine.split.map parseInta.sort cmpif n mod 2 == 0:echo (a[n div 2] + a[n div 2 - 1]) / 2else:echo a[n div 2]