/* */
#include<iostream>
#include<cmath>

using namespace std;


void is_zero(int n){
    int m = (sqrt(8*n+1)-1)/2;
    int re = n - m*(m+1)/2;
    if(n == 1||re == 1){
        cout<<"位置"<<n<<"该位置是1"<<endl;
    }
    else{
        cout<<"位置"<<n<<"该位置是0"<<endl;
    }
}


int main(){
    for(int i = 1;i<100;++i){
        is_zero(i);
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
猜你喜欢
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-06-08
  • 2021-09-05
相关资源
相似解决方案