T1.码灵鼠

手推f[2],f[3]可以发现f[i]=i-1

给出归纳证明:

8.12模拟赛

为什么E(ai)+E(aj)==2E(ai)?因为i和j是相互独立的。

记得long long

#include<iostream>
#include<cstdio>

using namespace std;

inline long long rd(){
    long long ret=0,f=1;char c;
    while(c=getchar(),!isdigit(c))f=c=='-'?-1:1;
    while(isdigit(c))ret=ret*10+c-'0',c=getchar();
    return ret*f;
}

long long n;

int main(){
    n=rd();
    for(int i=1;i<=n;i++){
        long long x=rd();
        printf("%lld\n",x+1ll);
    }
}
View Code

相关文章:

  • 2021-08-09
  • 2020-11-04
  • 2018-10-28
  • 2021-08-08
  • 2021-10-17
  • 2021-06-27
  • 2021-08-09
  • 2021-12-21
猜你喜欢
  • 2021-06-01
  • 2021-12-25
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
相关资源
相似解决方案