Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
51568 | 张思存 | 计算书费 | C++ | Accepted | 1 MS | 244 KB | 308 | 2024-09-22 18:09:23 |
#include<bits/stdc++.h> using namespace std; int main() { double manei=0; int a[10]; double b[10]={28.9,32.7,45.6,78,35,86.2,27.8,43,56,65}; for(int i=0;i<10;i++){ cin>>a[i];} for(int i=0;i<10;i++){ manei+=a[i]*b[i];} cout<<fixed<<setprecision(1)<<manei; }