【HDOJ5980】Find Small A(签到)

题意:不知道

思路:队友写的

复制代码
 1 #include <stdio.h>
 2 #include <vector>
 3 #include <algorithm>
 4 #include <string.h>
 5 #include <limits.h>
 6 #include <string>
 7 #include <iostream>
 8 #include <queue>
 9 #include <math.h>
10 #include <map>
11 using namespace std;
12 typedef long long int lint;
13 
14 int n,ans;
15 
16 int main(){
17     int n;
18     while(scanf("%d",&n)!=EOF){
19         ans = 0;
20         for(int i = 1; i <= n; ++i){
21             int num; scanf("%d",&num);
22             while(num != 0){
23                 int now = 1;
24                 for(int i = 1; i <= 7; ++i){
25                     now <<= 1; now += 1;
26                 }
27                 now = (num & now);
28                 num = num >> 8;
29                 if(now == 97){ ++ans;}
30             }
31         }
32         printf("%d\n",ans);
33     }
34     return 0;
35 }
复制代码

 

posted on   myx12345  阅读(308)  评论(0编辑  收藏  举报

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

导航

统计

点击右上角即可分享
微信分享提示