提交时间:2023-08-10 12:57:13
运行 ID: 24291
#include <iostream> using namespace std; int main() { int i = 1, day, temp_gold, gold = 0, temp_silver, silver = 0, temp_copper, copper = 0; cin >> day; for (i = 1; i <= day; i++) { cin >> temp_gold >> temp_silver >> temp_copper; gold += temp_gold; silver += temp_silver; copper += temp_copper; } cout << gold << ' ' << silver << ' ' << copper << ' ' << gold + silver + copper; return 0; }