| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 208864 | DysonSphere | Go (COCI16_go) | C++14 | 5 ms | 376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int ans=0,mx=-1;
string smx;
int main(){
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int t;
cin>>t;
for(int y=0;y<t;y++){
string name;
int evl,cand,cnt=0;
cin>>name>>evl>>cand;
while(cand>=evl){
int modd=cand%evl;
int div=cand/evl;
cand=modd+(div*2);
cnt+=div;
ans+=div;
}
if(cnt>mx){
mx=cnt;
smx=name;
}
}
cout<<ans<<"\n"<<smx;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
