-
I - Por Costel and the Pairs
- Gym - 100923I
- 建议写出一些找找规律注意去重
-
#include <iostream> #include <stdio.h> #include <cmath> using namespace std; #define ll long long ll t,n,ans,temp; int main() { freopen("perechi3.in","r",stdin); freopen("perechi3.out","w",stdout); scanf("%lld",&t); while(t--) { ans=0; scanf("%lld",&n); for(ll i=1; i<=sqrt(n); i++) ans+=2*(n/i); temp=sqrt(n); ans-=temp*temp; printf("%lld\n",ans); } return 0; }
I - Por Costel and the Pairs
最新推荐文章于 2019-08-17 23:45:00 发布