10 条题解
-
1
#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递交作业题目 - 质因数问题 - 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>
-
-1
#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; }
-
-2递交作业题目 - 质因数问题 - 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递交作业题目 - 质因数问题 - 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>
-
-2递交作业题目 - 质因数问题 - 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>
-
-2递交作业题目 - 质因数问题 - 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>
-
-2递交作业题目 - 质因数问题 - 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>
-
-2递交作业题目 - 质因数问题 - 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>
-
-2递交作业题目 - 质因数问题 - 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>
- 1
信息
- ID
- 1249
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 43
- 已通过
- 17
- 上传者