100 Accepted
Syncing testdata, please wait...
# | 状态 分数 | 耗时 | 内存占用 |
---|---|---|---|
#1 | Accepted 10 | 4ms | 320 KiB |
#2 | Accepted 10 | 4ms | 536 KiB |
#3 | Accepted 10 | 4ms | 320 KiB |
#4 | Accepted 10 | 4ms | 328 KiB |
#5 | Accepted 10 | 4ms | 324 KiB |
#6 | Accepted 10 | 17ms | 536 KiB |
#7 | Accepted 10 | 214ms | 544 KiB |
#8 | Accepted 10 | 37ms | 536 KiB |
#9 | Accepted 10 | 419ms | 496 KiB |
#10 | Accepted 10 | 448ms | 544 KiB |
代码
#include<bits/stdc++.h>
using namespace std;
int main() {
long long n,m,i,num;
cin>>n;
long long s=(n+1)/2;
for(i=1;i<=n/4;i+=2)
{
num=0;
m=i;
while(m<=n/2){
num++;
m*=2;
}
s+=num/2;
}
cout<<s<<endl;
return 0;
}
信息
- 递交者
- 题目
- P461 练83.3 特殊的集合
- 语言
- C++17(O2)
- 代码长度
- 253 Bytes
- 递交时间
- 2024-2-5 22:27:39
- 评测时间
- 2024-2-5 22:27:41
- 分数
- 100
- 总耗时
- 1155ms
- 峰值时间
- 448ms
- 峰值内存
- 544 KiB