# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
974349 | 2024-05-03T09:04:25 Z | vjudge1 | Savrsen (COCI17_savrsen) | C | 938 ms | 78684 KB |
#include<stdio.h> #include<stdlib.h> int j,i,a,b;long long z,f[10000001]; int main() { scanf("%d%d",&a,&b); for(i=1;i<=b;++i)for(j=i+i;j<=b;j+=i)f[j]+=i; for(i=a;i<=b;++i)z+=abs(f[i]-i); printf("%lld",z); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 2 ms | 1116 KB | Output is correct |
4 | Correct | 872 ms | 78680 KB | Output is correct |
5 | Correct | 938 ms | 78684 KB | Output is correct |
6 | Correct | 877 ms | 78684 KB | Output is correct |
7 | Correct | 832 ms | 73356 KB | Output is correct |
8 | Correct | 172 ms | 22104 KB | Output is correct |