3 solutions

  • 2
    @ 2025-7-2 9:07:40
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin>>n;
        int b=sqrt(n);
        b=b*b;
        if(b==n)
        {
            cout<<"YES";
        }
        else cout<<"NO";
        return 0;
    }
    
    • 1
      @ 2025-7-2 9:07:37
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n;
          cin>>n;
          cout<<n<<"=";
          int i=2;
          while(n!=1)
          {
              bool temp=true;
              while(temp)
              {
                  if(n%i==0)
                  {
                      cout<<i;
                      n/=i;
                      if(n!=1) cout<<"*";
                  }
                  else temp=false;
              }
              i++;
          }
      }
      
      • -1
        @ 2025-7-3 16:15:59
        0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484
        
        • 1

        Information

        ID
        2802
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        28
        Accepted
        13
        Uploaded By