Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120459 | 施宸雨 | 22兔子问题 | C++ | Accepted | 1 MS | 276 KB | 455 | 2025-05-25 20:28:25 |
#include <vector> #include <iostream> using namespace std; int main() { int m; cin >> m; vector<int> rabbits; for(int i = 0; i < m; ++i) { int x; cin >> x; rabbits.push_back(x); } int total_legs = 0; int total_eyes = 0; for(int x : rabbits) { total_legs += x * 4; total_eyes += x * 2; } cout << total_legs << " " << total_eyes << endl; return 0; }