Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87821 王冠中 大力水手吃蔬菜 C++ Accepted 1 MS 272 KB 263 2024-08-15 10:30:58

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ int number,price,s=0,ndd=1000,n; cin >> n; for(int i=1;i<=n;i++){ cin >> number>>price; if(price<ndd){ ndd=price; } s+=number*ndd; } cout << s; return 0; }