10 条题解

  • 1
    @ 2023-3-2 21:14:24
    #include<bits/stdc++.h>
    using namespace std; 
    int n,a[100001]={0},g;
    int zzh(int k,int l)
    {
    	while(1)
    	{
    		if(n%l!=0)
    		{
    			return n;
    		}
    		n=n/l;
    	}
    }
    int main()
    {
        cin>>n;
        g=n;
        for(int i=2;i<=n;i++)
        {
            if(n%i==0)
            {
                a[i]=1;
                zzh(a[i],i); 
            }
        }
        for(int i=2;i<=g;i++)
        {
            if(a[i]==1)
            {
                cout<<i<<" ";
            }
        }
        return 0;
    }
    
    • 1
      @ 2023-3-2 20:29:31
      递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

      递交以评测

      代码语言

      <select name="lang" class="select"

        C
      </option><option value="cc">
        C++
      </option><option value="cc.std98">
        C++ 98
      </option><option value="cc.std11">
        C++ 11
      </option><option value="cc.std17">
        C++ 17
      </option><option value="pas">
        Pascal
      </option><option value="java" selected>
        Java
      </option><option value="py">
        Python
      </option><option value="py.py2">
        Python 2
      </option><option value="py.py3">
        Python 3
      </option><option value="php">
        PHP
      </option><option value="rs">
        Rust
      </option><option value="hs">
        Haskell
      </option><option value="js">
        Javascript (JSC)
      </option><option value="go">
        Golang
      </option><option value="rb">
        Ruby
      </option><option value="cs">
        Csharp
      </option><option value="jl">
        Julia
      </option></select>
      
        </label>
        </div>
      
            </div>
            <div class="row nojs--hide" id="codelang-selector"></div>
            <div class="row">
      
      代码
        </label>
        </div>
      
            <div class="row">
              <div class="medium-12 columns">
                <p>Or upload a file: <input type="file" name="file"></p>
                <br />
              </div>
            </div>
            <div class="row"><div class="columns">
              <input type="submit" class="rounded primary button" value="递交">
            </div></div>
          </form>
        </div>
      </div>
      

      信息

      ID
      1249
      时间
      1000ms
      内存
      256MiB
      难度
      (无)
      标签
      (无)
      递交数
      已通过
      上传者
      mzh
      • -1
        @ 2023-3-2 19:43:56
        #include<bits/stdc++.h>
        using namespace std; 
        int n,a[100001]={0},g;
        int zzh(int k,int l)
        {
        	while(1)
        	{
        		if(n%l!=0)
        		{
        			return n;
        		}
        		n=n/l;
        	}
        }
        int main()
        {
            cin>>n;
            g=n;
            for(int i=2;i<=n;i++)
            {
                if(n%i==0)
                {
                    a[i]=1;
                    zzh(a[i],i); 
                }
            }
            for(int i=2;i<=g;i++)
            {
                if(a[i]==1)
                {
                    cout<<i<<" ";
                }
            }
            return 0;
        }
        
        • @ 2023-3-2 20:52:27

          发题解?斩了!

      • -2
        @ 2023-3-2 20:32:12
        递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }
        • -2
          @ 2023-3-2 20:29:36
          递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

          递交以评测

          代码语言

          <select name="lang" class="select"

            C
          </option><option value="cc">
            C++
          </option><option value="cc.std98">
            C++ 98
          </option><option value="cc.std11">
            C++ 11
          </option><option value="cc.std17">
            C++ 17
          </option><option value="pas">
            Pascal
          </option><option value="java" selected>
            Java
          </option><option value="py">
            Python
          </option><option value="py.py2">
            Python 2
          </option><option value="py.py3">
            Python 3
          </option><option value="php">
            PHP
          </option><option value="rs">
            Rust
          </option><option value="hs">
            Haskell
          </option><option value="js">
            Javascript (JSC)
          </option><option value="go">
            Golang
          </option><option value="rb">
            Ruby
          </option><option value="cs">
            Csharp
          </option><option value="jl">
            Julia
          </option></select>
          
            </label>
            </div>
          
                </div>
                <div class="row nojs--hide" id="codelang-selector"></div>
                <div class="row">
          
          代码
            </label>
            </div>
          
                <div class="row">
                  <div class="medium-12 columns">
                    <p>Or upload a file: <input type="file" name="file"></p>
                    <br />
                  </div>
                </div>
                <div class="row"><div class="columns">
                  <input type="submit" class="rounded primary button" value="递交">
                </div></div>
              </form>
            </div>
          </div>
          

          信息

          ID
          1249
          时间
          1000ms
          内存
          256MiB
          难度
          (无)
          标签
          (无)
          递交数
          已通过
          上传者
          mzh
          • -2
            @ 2023-3-2 20:29:26
            递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

            递交以评测

            代码语言

            <select name="lang" class="select"

              C
            </option><option value="cc">
              C++
            </option><option value="cc.std98">
              C++ 98
            </option><option value="cc.std11">
              C++ 11
            </option><option value="cc.std17">
              C++ 17
            </option><option value="pas">
              Pascal
            </option><option value="java" selected>
              Java
            </option><option value="py">
              Python
            </option><option value="py.py2">
              Python 2
            </option><option value="py.py3">
              Python 3
            </option><option value="php">
              PHP
            </option><option value="rs">
              Rust
            </option><option value="hs">
              Haskell
            </option><option value="js">
              Javascript (JSC)
            </option><option value="go">
              Golang
            </option><option value="rb">
              Ruby
            </option><option value="cs">
              Csharp
            </option><option value="jl">
              Julia
            </option></select>
            
              </label>
              </div>
            
                  </div>
                  <div class="row nojs--hide" id="codelang-selector"></div>
                  <div class="row">
            
            代码
              </label>
              </div>
            
                  <div class="row">
                    <div class="medium-12 columns">
                      <p>Or upload a file: <input type="file" name="file"></p>
                      <br />
                    </div>
                  </div>
                  <div class="row"><div class="columns">
                    <input type="submit" class="rounded primary button" value="递交">
                  </div></div>
                </form>
              </div>
            </div>
            

            信息

            ID
            1249
            时间
            1000ms
            内存
            256MiB
            难度
            (无)
            标签
            (无)
            递交数
            已通过
            上传者
            mzh
            • -2
              @ 2023-3-2 20:29:20
              递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

              递交以评测

              代码语言

              <select name="lang" class="select"

                C
              </option><option value="cc">
                C++
              </option><option value="cc.std98">
                C++ 98
              </option><option value="cc.std11">
                C++ 11
              </option><option value="cc.std17">
                C++ 17
              </option><option value="pas">
                Pascal
              </option><option value="java" selected>
                Java
              </option><option value="py">
                Python
              </option><option value="py.py2">
                Python 2
              </option><option value="py.py3">
                Python 3
              </option><option value="php">
                PHP
              </option><option value="rs">
                Rust
              </option><option value="hs">
                Haskell
              </option><option value="js">
                Javascript (JSC)
              </option><option value="go">
                Golang
              </option><option value="rb">
                Ruby
              </option><option value="cs">
                Csharp
              </option><option value="jl">
                Julia
              </option></select>
              
                </label>
                </div>
              
                    </div>
                    <div class="row nojs--hide" id="codelang-selector"></div>
                    <div class="row">
              
              代码
                </label>
                </div>
              
                    <div class="row">
                      <div class="medium-12 columns">
                        <p>Or upload a file: <input type="file" name="file"></p>
                        <br />
                      </div>
                    </div>
                    <div class="row"><div class="columns">
                      <input type="submit" class="rounded primary button" value="递交">
                    </div></div>
                  </form>
                </div>
              </div>
              

              信息

              ID
              1249
              时间
              1000ms
              内存
              256MiB
              难度
              (无)
              标签
              (无)
              递交数
              已通过
              上传者
              mzh
              • -2
                @ 2023-3-2 20:29:01
                递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

                递交以评测

                代码语言

                <select name="lang" class="select"

                  C
                </option><option value="cc">
                  C++
                </option><option value="cc.std98">
                  C++ 98
                </option><option value="cc.std11">
                  C++ 11
                </option><option value="cc.std17">
                  C++ 17
                </option><option value="pas">
                  Pascal
                </option><option value="java" selected>
                  Java
                </option><option value="py">
                  Python
                </option><option value="py.py2">
                  Python 2
                </option><option value="py.py3">
                  Python 3
                </option><option value="php">
                  PHP
                </option><option value="rs">
                  Rust
                </option><option value="hs">
                  Haskell
                </option><option value="js">
                  Javascript (JSC)
                </option><option value="go">
                  Golang
                </option><option value="rb">
                  Ruby
                </option><option value="cs">
                  Csharp
                </option><option value="jl">
                  Julia
                </option></select>
                
                  </label>
                  </div>
                
                      </div>
                      <div class="row nojs--hide" id="codelang-selector"></div>
                      <div class="row">
                
                代码
                  </label>
                  </div>
                
                      <div class="row">
                        <div class="medium-12 columns">
                          <p>Or upload a file: <input type="file" name="file"></p>
                          <br />
                        </div>
                      </div>
                      <div class="row"><div class="columns">
                        <input type="submit" class="rounded primary button" value="递交">
                      </div></div>
                    </form>
                  </div>
                </div>
                

                信息

                ID
                1249
                时间
                1000ms
                内存
                256MiB
                难度
                (无)
                标签
                (无)
                递交数
                已通过
                上传者
                mzh
                • -2
                  @ 2023-3-2 20:28:54
                  递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

                  递交以评测

                  代码语言

                  <select name="lang" class="select"

                    C
                  </option><option value="cc">
                    C++
                  </option><option value="cc.std98">
                    C++ 98
                  </option><option value="cc.std11">
                    C++ 11
                  </option><option value="cc.std17">
                    C++ 17
                  </option><option value="pas">
                    Pascal
                  </option><option value="java" selected>
                    Java
                  </option><option value="py">
                    Python
                  </option><option value="py.py2">
                    Python 2
                  </option><option value="py.py3">
                    Python 3
                  </option><option value="php">
                    PHP
                  </option><option value="rs">
                    Rust
                  </option><option value="hs">
                    Haskell
                  </option><option value="js">
                    Javascript (JSC)
                  </option><option value="go">
                    Golang
                  </option><option value="rb">
                    Ruby
                  </option><option value="cs">
                    Csharp
                  </option><option value="jl">
                    Julia
                  </option></select>
                  
                    </label>
                    </div>
                  
                        </div>
                        <div class="row nojs--hide" id="codelang-selector"></div>
                        <div class="row">
                  
                  代码
                    </label>
                    </div>
                  
                        <div class="row">
                          <div class="medium-12 columns">
                            <p>Or upload a file: <input type="file" name="file"></p>
                            <br />
                          </div>
                        </div>
                        <div class="row"><div class="columns">
                          <input type="submit" class="rounded primary button" value="递交">
                        </div></div>
                      </form>
                    </div>
                  </div>
                  

                  信息

                  ID
                  1249
                  时间
                  1000ms
                  内存
                  256MiB
                  难度
                  (无)
                  标签
                  (无)
                  递交数
                  已通过
                  上传者
                  mzh
                  • -2
                    @ 2023-3-2 20:28:20
                    递交作业题目 - 质因数问题 - Hydro body { --font-family: "Microsoft Yahei", "Open Sans", "Seravek", "Segoe UI", "Verdana", "PingFang SC", "Hiragino Sans GB", "Lantinghei SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans"; --code-font-family: "Ubuntu Mono", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace"; --font-ligatures: none !important; } #panel { display: flex; flex-direction: column; }

                    递交以评测

                    代码语言

                    <select name="lang" class="select"

                      C
                    </option><option value="cc">
                      C++
                    </option><option value="cc.std98">
                      C++ 98
                    </option><option value="cc.std11">
                      C++ 11
                    </option><option value="cc.std17">
                      C++ 17
                    </option><option value="pas">
                      Pascal
                    </option><option value="java" selected>
                      Java
                    </option><option value="py">
                      Python
                    </option><option value="py.py2">
                      Python 2
                    </option><option value="py.py3">
                      Python 3
                    </option><option value="php">
                      PHP
                    </option><option value="rs">
                      Rust
                    </option><option value="hs">
                      Haskell
                    </option><option value="js">
                      Javascript (JSC)
                    </option><option value="go">
                      Golang
                    </option><option value="rb">
                      Ruby
                    </option><option value="cs">
                      Csharp
                    </option><option value="jl">
                      Julia
                    </option></select>
                    
                      </label>
                      </div>
                    
                          </div>
                          <div class="row nojs--hide" id="codelang-selector"></div>
                          <div class="row">
                    
                    代码
                      </label>
                      </div>
                    
                          <div class="row">
                            <div class="medium-12 columns">
                              <p>Or upload a file: <input type="file" name="file"></p>
                              <br />
                            </div>
                          </div>
                          <div class="row"><div class="columns">
                            <input type="submit" class="rounded primary button" value="递交">
                          </div></div>
                        </form>
                      </div>
                    </div>
                    

                    信息

                    ID
                    1249
                    时间
                    1000ms
                    内存
                    256MiB
                    难度
                    (无)
                    标签
                    (无)
                    递交数
                    已通过
                    上传者
                    mzh
                    • 1

                    信息

                    ID
                    1249
                    时间
                    1000ms
                    内存
                    256MiB
                    难度
                    5
                    标签
                    递交数
                    43
                    已通过
                    17
                    上传者