# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
371031 | 2021-02-25T16:00:32 Z | FatihSolak | Savrsen (COCI17_savrsen) | C++17 | 1353 ms | 39660 KB |
#include <bits/stdc++.h> #define N 10000005 using namespace std; int arr[N]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); int a,b; cin >> a >> b; long long sum = 0; for(int i=1;i<N;i++){ for(int j=i+i;j<N;j+=i){ arr[j] -= i; } arr[i]+=i; } for(int i=a;i<=b;i++){ sum += abs(arr[i]); } cout << sum; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1353 ms | 39532 KB | Output isn't correct |
2 | Incorrect | 1307 ms | 39532 KB | Output isn't correct |
3 | Incorrect | 1317 ms | 39660 KB | Output isn't correct |
4 | Incorrect | 1333 ms | 39600 KB | Output isn't correct |
5 | Incorrect | 1299 ms | 39660 KB | Output isn't correct |
6 | Incorrect | 1307 ms | 39532 KB | Output isn't correct |
7 | Incorrect | 1320 ms | 39632 KB | Output isn't correct |
8 | Incorrect | 1323 ms | 39532 KB | Output isn't correct |