結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー ty70ty70
提出日時 2017-01-06 14:20:22
言語 Bash
(Bash 5.1.16)
結果
WA  
実行時間 -
コード長 181 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 5,364 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-22 15:11:10
合計ジャッジ時間 6,657 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
4,376 KB
testcase_01 AC 43 ms
4,376 KB
testcase_02 AC 44 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 425 ms
4,376 KB
testcase_05 AC 145 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 266 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 417 ms
4,380 KB
testcase_10 AC 11 ms
4,380 KB
testcase_11 AC 150 ms
4,376 KB
testcase_12 AC 163 ms
4,380 KB
testcase_13 AC 6 ms
4,380 KB
testcase_14 AC 6 ms
4,376 KB
testcase_15 AC 371 ms
4,376 KB
testcase_16 AC 35 ms
4,376 KB
testcase_17 AC 18 ms
4,376 KB
testcase_18 AC 322 ms
4,380 KB
testcase_19 AC 114 ms
4,376 KB
testcase_20 AC 27 ms
4,376 KB
testcase_21 AC 23 ms
4,380 KB
testcase_22 AC 124 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 7 ms
4,376 KB
testcase_26 AC 6 ms
4,376 KB
testcase_27 AC 6 ms
4,376 KB
testcase_28 AC 7 ms
4,376 KB
testcase_29 AC 161 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/bin/bash

read n
#echo "n: " $n
i=0
sum=0
while [ $i -lt $n ]
do
	read val
#	echo "val: " $val
	sum=`echo "scale=10; $sum+$val" | bc`
	i=`expr $i + 1`
done
printf '%.10f\n' $sum
0