# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
102286 | SirCeness | Go (COCI16_go) | C++14 | 4 ms | 428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define mod 1000000007
typedef long long ll;
using namespace std;
int n;
int main(){
//freopen("baskent.gir", "r", stdin);
cin >> n;
string ans = "";
int maxx = -1;
int top = 0;
for (int i = 0; i < n; i++){
string s;
int k, m;
cin >> s >> k >> m;
int num = 0;
while (m/k != 0){
int add = m/k;
num += add;
m -= add*k;
m += add*2;
}
top += num;
if (maxx < num){
maxx = num;
ans = s;
}
}
cout << top << endl << ans << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |