제출 #7693

#제출 시각아이디문제언어결과실행 시간메모리
7693tncks0121CATS (NOI14_cats)C++98
0 / 25
84 ms1088 KiB
#include <stdio.h> typedef long long ll; ll X,L,N; int main() { for(scanf("%*d");3==scanf("%lld%lld%lld",&X,&L,&N); ){ ll res = 0; ll T = (X & (1ll<<((L/(2*N)+2))-1)) - 1; for(int i = 0; i < 60; i++) if((T >> i) & 1) ++res; res &= 1; res += 2*N + L/(2*N)*(2*N); printf("%lld\n", res); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...