# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
42367 | 2018-02-26T14:04:45 Z | milmillin | Savrsen (COCI17_savrsen) | C++14 | 1640 ms | 39876 KB |
#include <cstdio> using namespace std; int tbl[10000100]; int main () { for (int i=1;i<10000100;i++) { tbl[i]=i; } for (int i=1;i<10000100;i++) { for (int j=i+i;j<10000100;j+=i) { tbl[j]-=i; } } for (int i=1;i<10000100;i++) { if (tbl[i]<0) tbl[i]=-tbl[i]; tbl[i]+=tbl[i-1]; } int a,b; scanf("%d%d",&a,&b); printf("%d\n",tbl[b]-tbl[a-1]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1638 ms | 39544 KB | Output is correct |
2 | Correct | 1640 ms | 39672 KB | Output is correct |
3 | Incorrect | 1565 ms | 39776 KB | Output isn't correct |
4 | Incorrect | 1562 ms | 39776 KB | Output isn't correct |
5 | Incorrect | 1581 ms | 39776 KB | Output isn't correct |
6 | Incorrect | 1596 ms | 39776 KB | Output isn't correct |
7 | Incorrect | 1594 ms | 39776 KB | Output isn't correct |
8 | Incorrect | 1564 ms | 39876 KB | Output isn't correct |