ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#170423 | #1263. 人口增长 | luojianwei2216 | 100 | 0ms | 1280kb | C++ | 257b | 2023-04-22 19:14:26 | 2023-04-22 19:14:27 |
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int AfterYears = 0;
double Populars = 13.0, r;
cin >> r;
r /= 100;
while(Populars < 20) {
Populars = Populars * (1 + r);
AfterYears += 1;
}
cout << AfterYears;
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1276kb
input:
1.5
output:
29
result:
ok single line: '29'
Test #2:
score: 10
Accepted
time: 0ms
memory: 1280kb
input:
1
output:
44
result:
ok single line: '44'
Test #3:
score: 10
Accepted
time: 0ms
memory: 1280kb
input:
3.08
output:
15
result:
ok single line: '15'
Test #4:
score: 10
Accepted
time: 0ms
memory: 1280kb
input:
4.70
output:
10
result:
ok single line: '10'
Test #5:
score: 10
Accepted
time: 0ms
memory: 1276kb
input:
3.66
output:
12
result:
ok single line: '12'
Test #6:
score: 10
Accepted
time: 0ms
memory: 1280kb
input:
2.58
output:
17
result:
ok single line: '17'
Test #7:
score: 10
Accepted
time: 0ms
memory: 1276kb
input:
1.11
output:
40
result:
ok single line: '40'
Test #8:
score: 10
Accepted
time: 0ms
memory: 1276kb
input:
4.90
output:
10
result:
ok single line: '10'
Test #9:
score: 10
Accepted
time: 0ms
memory: 1276kb
input:
3.91
output:
12
result:
ok single line: '12'
Test #10:
score: 10
Accepted
time: 0ms
memory: 1280kb
input:
1.19
output:
37
result:
ok single line: '37'