답안 #153841

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
153841 2019-09-16T20:39:01 Z bogdan_buzatu Savrsen (COCI17_savrsen) C++14
30 / 120
1609 ms 39544 KB
#include <iostream>
#include <algorithm>
#define pozitie second
#define numar first
using namespace std;

int n,x,sol,ciur[10000010],a,b;
int main(){
    cin>>a>>b;
    if(a==1){
        sol=1;
    }
    for(int i=2;i<=b;i++){
        for(int j=i+i;j<=b;j+=i){
            ciur[j]+=i;
        }
        x=ciur[i]+1-i;
        x=max(x,-x);
        if(i>=a){
            sol+=x;
        }



    }


    cout<<sol;


}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 5 ms 764 KB Output isn't correct
4 Incorrect 1361 ms 39496 KB Output isn't correct
5 Incorrect 1609 ms 39528 KB Output isn't correct
6 Incorrect 1526 ms 39544 KB Output isn't correct
7 Incorrect 1222 ms 36424 KB Output isn't correct
8 Incorrect 131 ms 10232 KB Output isn't correct