Submission #8985

#TimeUsernameProblemLanguageResultExecution timeMemory
8985veckalPenalty calculation (kriii2_PE)C++14
4 / 4
0 ms1088 KiB
#include<stdio.h> int n, t[100], s[100]; int main() { scanf("%d", &n); for (int i=0; i<n; ++i) scanf("%d%d", t+i, s+i); int f = 0; for (int i=1; i<n; ++i) if (s[f] < s[i]) f = i; if (s[f] == 0) puts("0"); else printf("%d\n", t[f]+f*20); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...