Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
1628 A班-黎祖彦 求1~n中每个数的因子有哪些? C++ 通过 100 5 MS 256 KB 265 2024-12-07 11:13:51

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n,a,b,c,d=0,e=0,sum; cin>>n; for(int i=1;i<=n;i++) { cout<<i<<':'; for(int j=1;j<=n;j++) { if(i%j==0) { cout<<j<<' '; } } cout<<endl; } //cout<<d<<endl<<e; }


测评信息: