foo.cc:1:1: error: 'def' does not name a type
1 | def gcd (x,y):
| ^~~
foo.cc:3:1: error: expected unqualified-id before 'else'
3 | else:return x;
| ^~~~
foo.cc:5:1: error: 'n' does not name a type
5 | n=0;k=0;i=0;
| ^
foo.cc:5:5: error: 'k' does not name a type
5 | n=0;k=0;i=0;
| ^
foo.cc:5:9: error: 'i' does not name a type
5 | n=0;k=0;i=0;
| ^
foo.cc:6:1: error: 'ans' does not name a type
6 | ans=0;
| ^~~
foo.cc:7:1: error: 'n' does not name a type
7 | n,k=raw_input().split(' ');
| ^
foo.cc:8:1: error: 'n' does not name a type
8 | n=int(n);
| ^
foo.cc:9:1: error: 'k' does not name a type
9 | k=int(k);
| ^
foo.cc:10:1: error: expected unqualified-id before 'if'
10 | if n%2==1:ans = k**(n/2+1)*n;
| ^~
foo.cc:11:1: error: expected unqualified-id before 'else'
11 | else:ans=k**(n/2+1)*(n/2)+k**(n/2)*(n/2);
| ^~~~
foo.cc:12:1: error: expected unqualified-id before 'for'
12 | for i in range(1,n+1):ans+=k**(gcd(n,i));
| ^~~
foo.cc:13:1: error: 'print' does not name a type; did you mean 'int'?
13 | print ans/(2*n);
| ^~~~~
| int
[Hydro](https://hydro.ac)提供评测服务