标签:
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<cstdlib> #include<algorithm> #include<queue> #include<vector> #include<set> using namespace std; int t,n; int main() { while(scanf("%d",&t)!=EOF) { n=(int)sqrt(2*t); if(n*(n+1)==2*t) printf("YES\n"); else printf("NO\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/a972290869/p/4215566.html