Submission #19780

#TimeUsernameProblemLanguageResultExecution timeMemory
19780ilbbke창문 (kriii4_C)C++98
3 / 100
0 ms1084 KiB
#include <stdio.h> int n, m; long long ans = 0; int main() { int i, j; scanf("%d", &n); scanf("%d", &m); for(i = 1; i <= n; i++) { for(j = 1; j <= m; j++) { ans += 9 * i * j * (n - i + 1) * (m - j + 1); } } ans *= 4; ans /= n * (n + 1) * m * (m + 1); printf("%d", ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...