Submission #974341

#TimeUsernameProblemLanguageResultExecution timeMemory
974341sleepntsheepSavrsen (COCI17_savrsen)C11
0 / 120
751 ms39552 KiB
#include<stdio.h> #include<stdlib.h> int z,j,i,a,b,f[10000001]; int main() { scanf("%d%d",&a,&b); for(i=1;i<=b;++i)for(j=i;j<=b;j+=i)f[j]+=i; for(i=a;i<=b;++i)z+=abs(f[i]-i); printf("%d",z); }

Compilation message (stderr)

savrsen.c: In function 'main':
savrsen.c:6:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |     scanf("%d%d",&a,&b);
      |     ^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...