提交时间:2024-01-30 13:38:11
运行 ID: 39027
#include <iostream> using namespace std; int main(){ int sum = 0; int hand = 0; for(int i = 1; i <= 12;i++){ hand += 300; int pay; cin >> pay; hand -= pay; if(hand < 0) { cout << -i; return 0; } sum += hand/100*100; } cout << sum; return 0; }