mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 3566_zp___waj.cpp
This commit is contained in:
parent
8c657fe81d
commit
6efd43b096
16
SDUTOJ/3566_zp___waj.cpp
Normal file
16
SDUTOJ/3566_zp___waj.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <bits/stdc++.h>
|
||||
#define ll long long
|
||||
using namespace std;
|
||||
int main(){
|
||||
int n,loop,cnt=1;
|
||||
scanf("%d",&loop);
|
||||
while(loop--){
|
||||
scanf("%d",&n);
|
||||
if(n<6||n&1)puts("0");
|
||||
else {
|
||||
int ans=__builtin_popcount(n);
|
||||
printf("%lld\n",((ll)pow(3.0,ans)-3)/6);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user