結果
| 問題 | No.9014 テストの合計点と平均点 |
| ユーザー |
|
| 提出日時 | 2025-01-24 20:30:00 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 501 bytes |
| コンパイル時間 | 3,336 ms |
| コンパイル使用メモリ | 276,096 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-24 20:30:07 |
| 合計ジャッジ時間 | 4,338 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
int main() {
string s;
getline(cin, s);
double a = stod(s.substr(0,s.find(',')));
double b = stod(s.substr(s.find(',') + 1, (s.rfind('.') - s.find(',') - 1)));
double c = stod(s.substr(s.rfind(',') + 1, s.size() - s.rfind(',') - 1));
cout << "合計点" << ':' << a + b + c << endl;
cout << "平均点" << ':' << fixed << setprecision(1) << (a + b + c) / 3;
}