HDU-5980 Find Small A

水题

#include<iostream>
using namespace std;
typedef long long ll;
ll a;
int main()
{
    int n;
    cin>>n;
    int ans=0;
    while(n--)
    {
        cin>>a;
        while(a)
        {
            if(a%256==97) ans++;
            a/=256;
        }
    }
       cout<<ans<<endl;
    
    return 0;
}

猜你喜欢

转载自blog.csdn.net/wl16wzl/article/details/82927556
今日推荐