Problem : 1215 ( 七夕节 ) Judge Status : Accepted
RunId : 5937219 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
RunId : 5937219 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
#include <stdio.h> int t,n,f[500001]; void Init() { int i,j; for (i=1;i<=250000;i++) { for (j=i+i;j<=500000;j+=i) f[j]+=i; } } int main() { Init(); scanf("%d",&t); while (t--) { scanf("%d",&n); printf("%d\n",f[n]); } return 0; }