A752.成绩
2024-04-29 20:49:21
发布于:江苏
13阅读
0回复
0点赞
A752.成绩
难度:入门
来源:官方
AC代码(C/C++):
#include <bits/stdc++.h>
// #define _INT_MAX 2147483647
// #define _LONG_LONG_MAX 9223372036854775807
// #define _MATH_DEFINES_DEFINED
// #define debug freopen("in.txt","r",stdin), freopen("out.txt","w",stdout);
#define ZERO 0
#define ZERO_POINT_TWO 0.2
#define ZERO_POINT_THREE 0.3
#define ZERO_POINT_FIVE 0.5
#define CHARCTER_SPACE " "
// #define CHARACTER_LINE_BREAK "\n"
// #pragma GCC optimize("O2")
using namespace std;
int _regular_score, _mini_test_score, _final_exam_score;
void _Output(double _print, string _plus);
void _Output(double _print, string _plus) {
cout << _print << _plus; }
int main(void) {
ios::sync_with_stdio(false);
cin.tie(ZERO);
cout.tie(ZERO);
cin >> _regular_score >> _mini_test_score >> _final_exam_score;
double _total_score = _regular_score * ZERO_POINT_TWO + _mini_test_score * ZERO_POINT_THREE + _final_exam_score * ZERO_POINT_FIVE;
_Output(_total_score, CHARCTER_SPACE);
return ZERO; }
没有注释,自行学习。
by:ጿ ኈ ቼ ዽ ጿ
你的点赞和关注就是我更新题解的最大动力!
-----------------------------点个赞吧 ↓ !-----------------------------
这里空空如也
有帮助,赞一个