- P2's solution
[题解] P2. [System Test] Common Logarithm
- 2025-9-5 20:39:40 @
已知, 所得到的结果就是 的位数减 。
由于数据量过大,我们只能采用字符串输入的形式,而不能使用 long long
。
代码如下:
// P2. [System Test] Common Logarithm
// code by:cirrationaler
// time:2025/08/21
#include <bits/stdc++.h>
using namespace std;
char n;
int ans;
int main()
{
// freopen("code.in", "r", stdin);
freopen("log.in", "r", stdin);
freopen("log.out", "w", stdout);
n = getchar();
while(n != EOF)
{
ans++;
n = getchar();
}
printf("%d", ans - 1);
return 0;
}