# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
320325 | 2020-11-08T10:04:02 Z | rzbt | Savrsen (COCI17_savrsen) | C++14 | 1313 ms | 39532 KB |
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define F first #define S second #define all(x) x.begin(),x.end() #define MAXN 10000005 typedef long long ll; int eratosten[MAXN]; int zbir[MAXN]; using namespace std; int a,b; int main() { scanf("%d %d", &a, &b); for(int i=1;i<MAXN;i++){ for(int j=i+i;j<MAXN;j+=i){ zbir[j]+=i; } } ll res=0; for(;a<=b;a++){ res+=abs(a-zbir[a]); } printf("%lld",res); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1286 ms | 39524 KB | Output is correct |
2 | Correct | 1287 ms | 39512 KB | Output is correct |
3 | Correct | 1284 ms | 39524 KB | Output is correct |
4 | Correct | 1313 ms | 39396 KB | Output is correct |
5 | Correct | 1301 ms | 39524 KB | Output is correct |
6 | Correct | 1301 ms | 39520 KB | Output is correct |
7 | Correct | 1305 ms | 39524 KB | Output is correct |
8 | Correct | 1303 ms | 39532 KB | Output is correct |