1 条题解
-
2
#include<bits/stdc++.h> using namespace std;
int isgood(int x) { int y=0; for(int j=1;j<x;j++) { if(x%j0) y+=j; } if(yx) { cout<<x<<" its factors are "; for(int j=1;j<x;j++) { if(x%j==0) cout<<j<<" "; } cout<<endl; } return 0; }
int main() { int n; cin>>n;
for(int i=1;i<=n;i++) isgood(i); return 0;}
信息
- ID
- 200
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 6
- 标签
- 递交数
- 39
- 已通过
- 14
- 上传者