Submission #122928
Source Code Expand
#!/bin/bash # your code goes here read N K read R if [ $K -eq 1 ]; then R=( $( echo $R | sed -e "s/ /\n/g" | sort -rn | sed -e "s/\n/ /g" ) ) else R=( $( echo $R | sed -e "s/ /\n/g" | sort -n | sed -e "s/\n/ /g" ) ) fi ANS=0 for (( i = N-K; i < N; ++i )) do ANS=$( echo "scale=8; ( $ANS + ${R[$i]} ) / 2.0" | bc ) done echo $ANS
Submission Info
Submission Time | |
---|---|
Task | C - AtCoderプログラミング講座 |
User | kkk |
Language | Bash (4.2.25) |
Score | 0 |
Code Size | 360 Byte |
Status | WA |
Exec Time | 554 ms |
Memory | 1412 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 39 ms | 1268 KB |
00_sample_02.txt | WA | 38 ms | 1328 KB |
00_sample_03.txt | AC | 57 ms | 1264 KB |
00_sample_04.txt | AC | 68 ms | 1248 KB |
test_01.txt | AC | 37 ms | 1212 KB |
test_02.txt | AC | 552 ms | 1272 KB |
test_03.txt | AC | 280 ms | 1412 KB |
test_04.txt | WA | 37 ms | 1212 KB |
test_05.txt | AC | 523 ms | 1388 KB |
test_06.txt | AC | 276 ms | 1296 KB |
test_07.txt | WA | 35 ms | 1384 KB |
test_08.txt | AC | 480 ms | 1352 KB |
test_09.txt | AC | 265 ms | 1336 KB |
test_10.txt | WA | 37 ms | 1216 KB |
test_11.txt | AC | 232 ms | 1252 KB |
test_12.txt | AC | 301 ms | 1276 KB |
test_13.txt | AC | 471 ms | 1268 KB |
test_14.txt | AC | 84 ms | 1396 KB |
test_15.txt | AC | 161 ms | 1384 KB |
test_16.txt | AC | 169 ms | 1280 KB |
test_17.txt | AC | 196 ms | 1260 KB |
test_18.txt | AC | 554 ms | 1412 KB |
test_19.txt | AC | 192 ms | 1316 KB |
test_20.txt | AC | 207 ms | 1312 KB |
test_21.txt | AC | 43 ms | 1264 KB |
test_22.txt | AC | 181 ms | 1260 KB |
test_23.txt | AC | 115 ms | 1252 KB |
test_24.txt | AC | 146 ms | 1392 KB |
test_25.txt | AC | 467 ms | 1280 KB |
test_26.txt | AC | 343 ms | 1392 KB |
test_27.txt | AC | 113 ms | 1276 KB |
test_28.txt | AC | 58 ms | 1264 KB |
test_29.txt | AC | 452 ms | 1268 KB |
test_30.txt | AC | 103 ms | 1268 KB |