3 条题解
-
0
这道题非常简单,具体用到了一个小小的技巧,对于 而言, 等于几就等于它后面有几个 ,因此可得代码:
#include <bits/stdc++.h> using namespace std; int a,b,ans; int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); freopen("pow.in", "r", stdin); freopen("pow.out","w",stdout); cin >> a; cout << "1"; for (int i = 1;i <= a;++i) cout << "0"; return 0; } -
0
简单题。
由于以 为底数,所以直接在后面加 即可。(并且不用考虑大数据问题)
代码如下:
// P3. [System Test] Powers of 10 // code by:cirrationaler // time:2025/08/21 #include <bits/stdc++.h> using namespace std; int n; int main() { // freopen("code.in", "r", stdin); freopen("pow.in", "r", stdin); freopen("pow.out", "w", stdout); scanf("%d", &n); printf("1"); for (int i = 1; i <= n; i++) { printf("0"); } printf("\n"); return 0; }
- 1
信息
- ID
- 3
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 2
- 标签
- 递交数
- 75
- 已通过
- 25
- 上传者