Submission #222596

#TimeUsernameProblemLanguageResultExecution timeMemory
222596errorgornPopcount (COCI19_popcount)C++14
Compilation error
0 ms0 KiB
import math n,k=map(int,input().split(" ")) ans=[] mul=1 while (n!=1): temp=0 for i in range(0,n,5): temp|=(1<<i) ans+=["A=(((((A&"+str(temp)+")+((A>>"+str(1*mul)+")&"+str(temp)+"))+((A>>"+str(2*mul)+")&"+str(temp)+"))+((A>>"+str(3*mul)+")&"+str(temp)+"))+((A>>"+str(4*mul)+")&"+str(temp)+"))"] n=math.ceil(n/5) mul*=5 print(len(ans)) for i in range(len(ans)): print(ans[i])

Compilation message (stderr)

popcount.cpp:1:1: error: 'import' does not name a type; did you mean 'short'?
 import math
 ^~~~~~
 short