# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
147588 | 2019-08-30T07:43:21 Z | Ruxandra985 | Savrsen (COCI17_savrsen) | C++14 | 2019 ms | 78712 KB |
#include <cstdio> #include <iostream> #define MAXI 10000000 using namespace std; unsigned long long perf[MAXI]; int main() { //freopen ("a.in" , "r" , stdin); //freopen ("a.out" , "w" , stdout); int a, b , i , j; unsigned long long sol; scanf ("%d%d",&a,&b); for (i=1;i<=MAXI/2;i++){ for (j = 2 * i ; j<=MAXI ; j+=i) perf[j]+=i; } sol = 0; for (i=a;i<=b;i++) sol = sol + max ((unsigned long long)i - perf[i] , perf[i] - (unsigned long long)i); printf ("%llu",sol); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1892 ms | 78712 KB | Output isn't correct |
2 | Incorrect | 1884 ms | 78636 KB | Output isn't correct |
3 | Incorrect | 1946 ms | 78712 KB | Output isn't correct |
4 | Incorrect | 2000 ms | 78584 KB | Output isn't correct |
5 | Incorrect | 1881 ms | 78712 KB | Output isn't correct |
6 | Incorrect | 2004 ms | 78628 KB | Output isn't correct |
7 | Incorrect | 2019 ms | 78628 KB | Output isn't correct |
8 | Incorrect | 1985 ms | 78588 KB | Output isn't correct |