Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
50613 | yangtianqi | 202403-GESP-一级-找因数 | C++ | Accepted | 1 MS | 244 KB | 297 | 2024-09-01 14:08:05 |
//如果一个正整数 a 可以被另一个正整数 b 整除, b 是 a 的因数:从小到大输出正整数a 的所有因数; #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a; for(b=1;b<=a;b++) { if(a%b==0) { cout<<b<<endl; } } return 0; }