28 条题解
-
-3
#include <iostream> #include <math.h> #include <iomanip> using namespace std; #define LL Long Long const int N=1e5+10; const int INF=0x3f3f3f3f; int main() { int n; cin >> n; int x = n+1; while(x%n != 0) x++; cout << x << endl; for(int i = 1; i < n ; i++) { if(n%i == 0) cout << i << " "; } } ``` -
-4
#include <iostream> #include <math.h> #include <iomanip> using namespace std; #define LL Long Long const int N=1e5+10; const int INF=0x3f3f3f3f; int main() { int n; cin >> n; int num = 0; for (int i = 1 ; ++i) { sum += sum; n -= sum; if(n > sum) { sum++; n = sum; } } cout << sum << n << endl; }```
信息
- ID
- 964
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 617
- 已通过
- 346
- 上传者