Submission #9027

#TimeUsernameProblemLanguageResultExecution timeMemory
9027joonasPenalty calculation (kriii2_PE)C++98
4 / 4
0 ms1088 KiB
#include <cstdio> int main(){ int T[101], S[101]; int i, N, P=0, maxIndex=-1, maxS=0; scanf("%d", &N); for(i=0; i < N; ++i){ scanf("%d %d", &T[i], &S[i]); if(S[i] > maxS){ maxIndex = i; maxS = S[i]; } } P = maxIndex < 0 ? 0 : T[maxIndex] + (maxIndex)*20; printf("%d", P); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...