#include <iostream>
#include <string>
#include <vector>

using namespace std;


/*
无穷多次操作,第n灯的状态
*/
int main()
{
    long long n;
    while (cin >> n)
    {
        int count = 0;
        for (int i = 1; i <= n; i++)
        {
            if (n%i == 0)
            {
                count++;
            }
        }
        if (count % 2 == 0)
        {
            cout << 0 << endl;
        }
        else
        {
            cout << 1 << endl;
        }
    }
}

 

相关文章:

  • 2021-04-20
  • 2021-06-21
  • 2022-02-12
  • 2022-02-21
  • 2021-10-06
  • 2021-07-09
  • 2021-06-10
  • 2022-01-05
猜你喜欢
  • 2022-02-02
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案