結果
問題 |
No.9014 テストの合計点と平均点
|
ユーザー |
|
提出日時 | 2022-01-04 20:24:40 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 568 bytes |
コンパイル時間 | 2,291 ms |
コンパイル使用メモリ | 76,304 KB |
実行使用メモリ | 55,696 KB |
最終ジャッジ日時 | 2024-10-14 16:20:43 |
合計ジャッジ時間 | 3,970 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 3 |
ソースコード
import java. util. Scanner; public class Main{ public static void main (String[] args){ Scanner scanner = new Scanner (System. in); Double[] test = new Double[3]; Double x = 0.0; String answer = scanner. next(); String[] a = answer. split (","); for (int j = 0; j < test. length; j ++){ test[j] = Double. parseDouble (a[j]); } for (int j = 0; j < test. length; j ++){ x += test[j]; } System. out. println ("合計点:" + x); double f = x / test. length; System. out. println ("平均点:" + (Math. floor (f * 10)) / 10); } }