結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
4,380 KB
testcase_01 AC 47 ms
4,376 KB
testcase_02 AC 46 ms
4,384 KB
testcase_03 WA -
testcase_04 AC 420 ms
4,376 KB
testcase_05 AC 143 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 264 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 417 ms
4,376 KB
testcase_10 AC 10 ms
4,376 KB
testcase_11 AC 152 ms
4,376 KB
testcase_12 AC 164 ms
4,376 KB
testcase_13 AC 6 ms
4,376 KB
testcase_14 AC 6 ms
4,380 KB
testcase_15 AC 366 ms
4,380 KB
testcase_16 AC 35 ms
4,380 KB
testcase_17 AC 18 ms
4,376 KB
testcase_18 AC 322 ms
4,376 KB
testcase_19 AC 113 ms
4,376 KB
testcase_20 AC 26 ms
4,376 KB
testcase_21 AC 23 ms
4,376 KB
testcase_22 AC 122 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 6 ms
4,380 KB
testcase_26 AC 7 ms
4,380 KB
testcase_27 AC 6 ms
4,380 KB
testcase_28 AC 6 ms
4,376 KB
testcase_29 AC 159 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=30; $sum+$val" | bc`
	i=`expr $i + 1`
done
printf '%.10f\n' $sum
0