https://acm.hdu.edu.cn/showproblem.php?pid=6985

题意:

\[S(x)=\sum_{j=1}^x\sum_{i=1}^nf_i(j) \]

\(f_i\)是可能是以下这些函数hdu 6985/ 2021“MINIEYE杯”中国大学生算法设计超级联赛(4)1001 Calculus

\(\lim\limits_{x\rightarrow\infty}S(x)\)是否收敛

只有系数全是0,它才是收敛的

比赛时没有把\(S(x)\)搞清楚,以为单独的\(C\)以及\(1^x\)也收敛,忘记了外层有个 相当于有个正无穷的循环

#include<bits/stdc++.h>

using namespace std;

char s[104];

int main()
{
    int T,n;
    bool tag;
    scanf("%d",&T);
    while(T--)
    {
        scanf("%s",s);
        n=strlen(s);
        tag=true;
        for(int i=0;i<n;++i) 
        	if(isdigit(s[i]) && s[i]!='0') tag=false;
    	printf(tag ? "YES\n" : "NO\n");
	}
}

相关文章:

  • 2021-07-15
  • 2022-02-14
  • 2021-10-29
  • 2021-11-29
  • 2021-09-03
  • 2021-11-05
  • 2021-05-29
  • 2021-05-18
猜你喜欢
  • 2022-01-26
  • 2021-08-02
  • 2022-01-23
  • 2021-12-30
  • 2022-12-23
  • 2022-01-24
  • 2021-07-20
相关资源
相似解决方案