criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define sz(v) (int)v.size() 
#define all(v) v.begin(), v.end()
void dbg_out() { cerr << "\b\b]\n"; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T){ cerr << H << ", "; dbg_out(T...);}
#define watch(...) cerr << "[" << #__VA_ARGS__ << "]: [", dbg_out(__VA_ARGS__)


/****************************** CODE IS HERE ***********************************/

#define double long double
const double pi = acosl(-1.0);

auto degree = [&](double rad) {
    return (rad * 180.0 / pi);
};

const double eps = 1e-10;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr);

    double angle; cin >> angle;
    angle = pi * angle / 180.0;
    double x = 0, y = 0;
    int ans = 1;
    double curr = 0;
    auto move = [&]() {
        y += cosl(curr);
        x += sinl(curr);
        curr += angle;
    };
    move();
    while (fabs(x - 0) > eps or fabs(y - 0) > eps) {
        move();
        ans++;
    }

    cout << ans;

    

    return 0;
}


Compiler output:
a.cc:17:16: error: non-local lambda expression cannot have a capture-default
   17 | auto degree = [&](double rad) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back

#define int int64_t
#define ld long double

const int MOD = 1e9+7;
const int N = 1e6+5;

/*
    (n+1)*x = 360

*/

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin>>n;
    
    if(360%n==0) {
        cout<<360/n;
    }
    else {
        int lol = __gcd(360LL, n);
        cout<<360/lol;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:30:24: error: no matching function for call to '__gcd(long long int, int64_t&)'
   30 |         int lol = __gcd(360LL, n);
      |                   ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:30:24: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'long int')
   30 |         int lol = __gcd(360LL, n);
      |                   ~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
	ll x;
	cin >> x;
	x = 180 - x;
	ll gm = x / __gcd(x, 360) * 360;
	ll ans = gm / x;
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: no matching function for call to '__gcd(ll&, int)'
    9 |         ll gm = x / __gcd(x, 360) * 360;
      |                     ~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:9:26: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
    9 |         ll gm = x / __gcd(x, 360) * 360;
      |                     ~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector < int > vi;
typedef pair <int , int > pi;

#define F first
#define S second
#define pb push_back
#define mp make_pair
#define fr(i,a,b) for(int i=a;i<b;i++)




int isprime(ll n)
{
    int flag=0;
    for(ll i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {
            flag=1;;
            break;
        }
    }
    return flag;
}


int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
   int t;
   cin>>t;
   int f = 360;
   int ans=0;
   if(f%t==0)
   {
       ans+=f/t;
       cout<<ans<<"\n";
   }
   else
   {
       while(f%t!=0)
       {
           ans+=f/t;
           f= 360+(f%t);

       }
       ans+=f/t;
       cout<<ans;

   }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:56:5: error: expected '}' at end of input
   56 |    }
      |     ^
a.cc:33:1: note: to match this '{'
   33 | {
      | ^
Language: C++

// Author: HarshKumar

#include <bits/stdc++.h>
using namespace std;
#define ll int64_t
const ll N = 1e6 + 6, M = 1e9 + 7;
int main()
{
    ios::sync_with_stdio(false), cin.tie(nullptr);
    ll x;
    cin >> x;
    ll g = __gcd(360LL, x);
    cout << 360 / g;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: no matching function for call to '__gcd(long long int, int64_t&)'
   12 |     ll g = __gcd(360LL, x);
      |            ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:12:17: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'long int')
   12 |     ll g = __gcd(360LL, x);
      |            ~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >>X;
  int K;
  int Y;
  if ( K >= 60) {
  K = 360 / (180 - X) ;
    cout << K << endl ;
  }
  else{
    Y = 180 / X
    cout << Y << endl ;
  }
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before 'cout'
   14 |     Y = 180 / X
      |                ^
      |                ;
   15 |     cout << Y << endl ;
      |     ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;


int main()
{
	
	
	int x;
	cin>> x;
	
	int k = 360/x;
    if(isinif(k)==1)
	{
		cout<<"infinite";
	}	
	
	cout<< k;
	
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'isinif' was not declared in this scope; did you mean 'isinff'?
   13 |     if(isinif(k)==1)
      |        ^~~~~~
      |        isinff
Language: C++

#include <iostream>
#include <bits/stdc++.h>

int main(){
	int x, deg = 360, times = 0;
	cin >> x;
  	while(deg){
    	times++;
      	deg -= x;
      	if(deg < 0)
          deg += 360;
    }
	cout << times;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> x;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         cout << times;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
#include<cmath>
using namespace std;

int main()
{
  int x;
  cin>>x;
  cout<<math.floor(360/(180-x))<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'math' was not declared in this scope
    9 |   cout<<math.floor(360/(180-x))<<endl;
      |         ^~~~
Language: Java

import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution 
{     
  public static void main(String[] args) throws IOException
  {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int t=Integer.parseInt(br.readLine());
    System.out.println(360/t);
   }
}


Compiler output:
Main.java:9: error: class Solution is public, should be declared in a file named Solution.java
public class Solution 
       ^
1 error
Language: C++

#includ<bits/stdc++.h>
#include<cmath>
using namespace std;

int main()
{
  int x;
  cin>>x;
  cout<<math.floor(360/(180-x))<<endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>x;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cmath>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<math.floor(360/(180-x))<<endl;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:9: error: 'math' was not declared in this scope
    9 |   cout<<math.floor(360/(180-x))<<endl;
      |         ^~~~
a.cc:9:34: error: 'endl' was not declared in this scope
    9 |   cout<<math.floor(360/(180-x))<<endl;
      |                                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<cmath>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int saisyo(int a, int b) { // a > b
    r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }

  return (a * b) / b;
}


int main(void)
{
  int x;
  int k;
  cin >> x;

  int i = 1;

  int dig = saisyo(360, x) ;
  
  k = dig / x;
  
  cout << k;
 
  return 0;
 
}

Compiler output:
a.cc: In function 'int saisyo(int, int)':
a.cc:5:5: error: 'r' was not declared in this scope
    5 |     r = a % b;
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int x,
  cin >> x;
  
  if(360 % x == 0) {
    cout << 360 / x << endl;
  } else {
    cout << 360 / x + 1 << endl;
  }
  
  return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected initializer before '>>' token
    6 |   cin >> x;
      |       ^~
Language: C++

#include<iostream>
using namespace std;

int saisyo(int a, int b) { // a > b
    r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }

  return (a * b) / b;
}


int main(void)
{
  int x;
  int k;
  cin >> x;

  int i = 1;

  int dig = saisyo(360, x) 
  
  k = dig / x;
  
  cout << k;
 
  return 0;
 
}

Compiler output:
a.cc: In function 'int saisyo(int, int)':
a.cc:5:5: error: 'r' was not declared in this scope
    5 |     r = a % b;
      |     ^
a.cc: In function 'int main()':
a.cc:26:3: error: expected ',' or ';' before 'k'
   26 |   k = dig / x;
      |   ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

int X;
long double x=0.0, y=0.0;
long double M_PI = 3.14159265358979;
int main(void) {

	cin >> X;

	int K = 0;

	while (1) {
		x += cos(X*M_PI / 180.0*K); y += sin(X*M_PI / 180.0*K);
		//cout << x<< " " << y<< endl;

		K++;
		
		if (abs(x) < 0.00001 && abs(y) < 0.00001) { break; }
	}

	cout << K << endl;

	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/cmath:47,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:5:
a.cc:11:13: error: expected unqualified-id before numeric constant
   11 | long double M_PI = 3.14159265358979;
      |             ^~~~
Language: C++

#include <stdio.h>
#include <math.h>
int main() {

	int X=150;
	cin >> X;
	int a=X;
	int K=1;

	while( (a % 360) != 0) {
		a += X;
		K++;
	}

	printf("%d", K);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'sin'?
    6 |         cin >> X;
      |         ^~~
      |         sin
Language: C++

#include <iostream>



int main()
{
	int a,b=1;
	cin>>a;
	for(;;){
		if((a*b)%360==0){
			cout<<b<<endl;
			}
		}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin>>a;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |                         cout<<b<<endl;
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |                         cout<<b<<endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <math.h>
int main() {

	int X=150;
	cin >>X;
	int a=X;
	int K=1;

	while( (a % 360) != 0) {
		a += X;
		K++;
	}

	printf("%d", K);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'sin'?
    6 |         cin >>X;
      |         ^~~
      |         sin
Language: C++

#include<bits/stdc+.h>
using namespace std;

int main()
{
  int x;
  cin>>x;
  int t=(360)/x;
  if(t*x==360)cout<<t;
  else cout<<INT_MAX;
  return 0;
}


Compiler output:
a.cc:1:9: fatal error: bits/stdc+.h: No such file or directory
    1 | #include<bits/stdc+.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
 class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
         int x = sc.nextInt();
         System.out.println(360/x + (360%x==0 ? 0 : 1);
    }
}

Compiler output:
Main.java:6: error: ')' or ',' expected
         System.out.println(360/x + (360%x==0 ? 0 : 1);
                                                      ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
         int x = sc.nextInt();
         System.out.println(360/x + (360%x==0 ? 0 : 1);
    }
}

Compiler output:
Main.java:6: error: ')' or ',' expected
         System.out.println(360/x + (360%x==0 ? 0 : 1);
                                                      ^
1 error
Language: C++

#include<bit/stdc++.h>
using namespace std;
int main()
{
  int x;
  cin>>x;
  if(360%x==0)
    cout<<(360/x)<<endl;
  else
    cout<<(360/x)+1<<endl;
  
}


Compiler output:
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
    1 | #include<bit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc+.h>
using namespace std;

int main()
{
  int x;
  cin>>x;
  cout<<(360)/x;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc+.h: No such file or directory
    1 | #include<bits/stdc+.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
         int x = sc.nextInt();
         System.out.println(360/x);
    }
}

Compiler output:
Main.java:2: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
1 error
Language: C++

#include<bit/stdc++.h>
using namespace std;
int main()
{
  int x;
  cin>>x;
  cout<<(360/x)<<endl;
}

Compiler output:
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
    1 | #include<bit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>

using namespace std;

#define pii pair<int,int>
#define pb push_back
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define MOD 10000000000

ll factorial(ll n) { if(n == 0 || n == 1) return 1; ll res = 1;for(ll i=2;i<=n;i++) res = (res*n)%MOD;return res;}
ll mpow(ll a, ll n) { ll ret=1; ll b=a; while(n) { if(n&1) {ret=(ret*b)%MOD;} b=(b*b)%MOD; n>>=1; } return (ll)ret; }
int toint(const string &s) { stringstream ss(s); int x; ss >> x; return x; }
ll xGCD(ll a, ll b, ll &x, ll &y) { if (b == 0) {x = 1;y = 0;return a;} ll x1, y1, gcd = xGCD(b, a % b, x1, y1); x = y1; y = x1 - (a / b) * y1; return gcd; }
ll inverse(ll a) {ll x, y;ll gcd = xGCD(a, MOD, x, y);return (x%MOD+MOD)%MOD;}
ll bc(ll n, ll k) { if(n == k || k == 0) return 1; if(k == 1 || k == n-1) return n;ll a = factorial(n);ll b = inverse(factorial(k));ll c = inverse(factorial(n - k));return ((a%MOD*b%MOD)*c%MOD)%MOD;}
void fastscan(ll &x) { bool neg=false; register int c; x =0;c=getchar();if(c=='-') {neg = true;c=getchar();}for(;(c>47 && c<58);c=getchar())x = (x<<1) + (x<<3) +c -48;if(neg) x *=-1;}


int main() {
//     fstream fin,fout;
//     fin.open("sample.txt");
//     fout.open("res.txt");
    int x;
    cin>>x;
    
    double sides = 360.0/(float)x;
    
    double i=1.0;
    
    while(true) {
        double diff =sides*i-(int)(sides*i);
        //cout<<diff<<endl;
        if(diff > 1e-3) i++;
        else break;
    }
    
    cout<<sides*i;
//     cout << duration.count() << endl;
//     fin.close();
//     fout.close();
    return 0;
}



Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main() {
	double a;
	cin >> a;
	double b = 360.0 / a;
	cout << ceil(b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'ceil' was not declared in this scope
    7 |         cout << ceil(b) << endl;
      |                 ^~~~
Language: C


#include<bits/stdc++.h>
using namespace std;
int main()
{

    long long int t,a,b,i,n,m,j,x,y,c,z,sum;
    string s;
    cin>>n;
        cout<<(360/double(n))<<endl;
        }


Compiler output:
main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
    2 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int X = Integer.parseInt(scanner.next());
        int K = 0;

        scanner.close();
        if (360 % X == 0){
            K = 360 / X;
        } else {
            K = lcm(360, X);
            K /= X;
        }
        

        System.out.println(K);
    }

    static int lcm (int a, int b) {
        int tmp;
        long c = a;
        c *= b;
        while((tmp = a % b) !=0 ) {
            a = b;
            b = tmp;
        }
        return (int)(c / b);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <bits/stdc++>

int main(){
    int X, K = 1, fac;
    scanf("%d", &X);
    
    fac = X;
    while(fac % 360){
        ++K;
        fac += X;
    }
    
    printf("%d\n", K);
    return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int X = Integer.parseInt(scanner.next());
        int K = 0;

        scanner.close();
        if (360 % X == 0){
            K = 360 / X;
        } else {
            K = lcm(360, X);
            K /= X;
        }
        

        System.out.println(K);
    }

    static int lcm (int a, int b) {
        int tmp;
        long c = a;
        c *= b;
        while((tmp = a % b) !=0 ) {
            a = b;
            b = tmp;
        }
        return (int)(c / b);
    }
}



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int X;
  cin >> X;
  
  if (360%X == 0) {
     cout << 360 / X << endl;
  }
  
  else {
  

int lcm(X, 360)
{
   return X * 360 / gcd(X, 360);
}

int main()
{
   cout << lcm(a, b) << endl;
   return 0;
}
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int lcm(X, 360)
      |               ^
a.cc:16:1: error: expected ',' or ';' before '{' token
   16 | {
      | ^
a.cc:20:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   20 | int main()
      |         ^~
a.cc:20:9: note: remove parentheses to default-initialize a variable
   20 | int main()
      |         ^~
      |         --
a.cc:20:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:21:1: error: a function-definition is not allowed here before '{' token
   21 | {
      | ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >>X;
  int K;
  K = 360 / (180 - K) ;
    cout << K << endl ;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected '}' at end of input
    9 |     cout << K << endl ;
      |                        ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
	int x;
	cin>>x;
	cout<<360/(__gcd(x,360));
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to '__gcd(long long int&, int)'
    7 |         cout<<360/(__gcd(x,360));
      |                    ~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:7:25: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
    7 |         cout<<360/(__gcd(x,360));
      |                    ~~~~~^~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cmath>
#include <algorithm>
using namespace std;
using LL = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; i++)
const int INF = 1e9;
const int E = numeric_limits<int>::min();

int main(void)
{
    int X;
    cin >> X;

    int deg = 0, count = 0;
    while (deg != 360){
        if (deg > 360){
            deg -= 360;
        }
        deg += X;
        count++;
    }

    cout << count << endl;

    return 0;
}

Compiler output:
main.c:4:10: fatal error: iostream: No such file or directory
    4 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

/*
 * @Author: Luisvacson
 * @LastEditors: Luisvacson
 * @Descriptions: None
 * @Date: 2020-06-20 20:10:47
 * @LastEditTime: 2020-06-20 20:11:55
 * @FilePath: \VSC\C++\Public\AC agc046 A.cpp
 */ 
#include<bits/stdc++.h>
using namespace std;

int gcd(int x.int y){
    if(!y) return x;
    else return gcd(y,x%y);
}

signed main(){
    int x;
    scanf("%d",&x);
    printf("%d\n",360/gcd(x,360));
    return 0;
}

Compiler output:
a.cc:12:14: error: expected ',' or '...' before '.' token
   12 | int gcd(int x.int y){
      |              ^
a.cc: In function 'int gcd(int)':
a.cc:13:9: error: 'y' was not declared in this scope
   13 |     if(!y) return x;
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(void)
{
  int x;
  int k;
  cin >> x;
  
  k = 360 / x
  
  cout << k;

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'cout'
   10 |   k = 360 / x
      |              ^
      |              ;
   11 | 
   12 |   cout << k;
      |   ~~~~
Language: Java


import java.util.Scanner;

public class A_TheStrider 
{
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int x = sc.nextInt();
		System.out.println((int)Math.ceil(360/x));
	}
}


Compiler output:
Main.java:4: error: class A_TheStrider is public, should be declared in a file named A_TheStrider.java
public class A_TheStrider 
       ^
1 error
Language: Java

mport java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int X = sc.nextInt();
		for(int i=1; i<=360; i++) {
			if((X*i)%360==0) {
				System.out.println(i);
				break;
			}
		}
		
		sc.close();
	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

import java.util.Scanner;

public class Solution {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int input = in.nextInt();
		double result = 360.0/input;
		System.out.println(result);

	}

}


Compiler output:
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: C++

#include <stdhio.h>
#include <math.h>
int main() {

	int X;
	int a=0;
	int K=0;
	where(a % 360 = 0) {
		a += X;
		K++;
	}

	printf("%d",K);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdhio.h: No such file or directory
    1 | #include <stdhio.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iosream>

int main(){
  int a;
  std::cin>>a;
  int i=1;
  while(true){
    if(360*i%a==0){
      std::cout<<360*i/a<<std::endl;
      break;
    }
    i++;
  }
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: iosream: No such file or directory
    1 | #include<iosream>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

package Atcoder;

import java.util.Scanner;

public class A_TheStrider 
{
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int x = sc.nextInt();
		System.out.println((int)Math.ceil(360/x));
	}
}


Compiler output:
Main.java:5: error: class A_TheStrider is public, should be declared in a file named A_TheStrider.java
public class A_TheStrider 
       ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int X;
    int K ;
    cin >> X 
    //Xto360nosaishoukoubasisu
    int ans;
    for(int i=1;i <= 180;i++){
        ans =i*360;
        if(360%X==0 || X %360==0){
            break;
        }
    }
    cout << ans/X<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'int'
    7 |     cin >> X
      |             ^
      |             ;
    8 |     //Xto360nosaishoukoubasisu
    9 |     int ans;
      |     ~~~      
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         ans =i*360;
      |         ^~~
      |         abs
a.cc:16:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |     cout << ans/X<<endl;
      |             ^~~
      |             abs
Language: C++

// A.

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#include <set>

using namespace std;

typedef long double LD;

int main(int argc, char* argv[]) {
	int a, r = 0;
	cin >> a;
	LD p = 0, q = 0;

	for (int t = 1; t < 1000000; ++t) {
		r = (r + a) % 360;
		LD x = cos(2 * M_PI * r / 360) * 65536;
		LD y = sin(2 * M_PI * r / 360) * 65536;
		p += x, q += y;
		if (abs(p) < 0.1 && abs(q) < 0.1) {
			cout << t << endl;
			break;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:23:32: error: 'M_PI' was not declared in this scope
   23 |                 LD x = cos(2 * M_PI * r / 360) * 65536;
      |                                ^~~~
a.cc:23:24: error: 'cos' was not declared in this scope
   23 |                 LD x = cos(2 * M_PI * r / 360) * 65536;
      |                        ^~~
a.cc:24:24: error: 'sin' was not declared in this scope
   24 |                 LD y = sin(2 * M_PI * r / 360) * 65536;
      |                        ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int lcm (int,int);
int gcd(int a, int b){ 
    if (a == 0) 
        return b;  
    return gcd(b % a, a);  
 } 
 
int lcm(int a, int b)  
 {  
    return (a*b)/gcd(a, b);  
 }  
} 
int main()
{
    int n,t=0;
    cin >> n;
    if (360 % n == 0) cout << 360/n;
    else {
    cout << lcm(360,n);
    }
    return 0;
}


Compiler output:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9;

double x, tt;

int main(){
	cin>>x;
	for(int i = 1; ; i++){
		if((i * x) % 360 == 0){
			cout<<i<<endl;
			return 0;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |                 if((i * x) % 360 == 0){
      |                    ~~~~~~~ ^ ~~~
      |                       |      |
      |                       double int
Language: C++

#include <bits/stdc++.h>
using namespace std;

int lcm(int a, int b) {
	return (a * b) / __gcd(a, b);
}

int main() {
	int n;
	cin >> n;
	if (360 % n == 0) cout << 360 / n << '\n';
	else cout << lcm(360, a) / 360 << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: 'a' was not declared in this scope
   12 |         else cout << lcm(360, a) / 360 << '\n';
      |                               ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <numeric>

using namespace std;

typedef long long ll;
typedef long double ld

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int k;
    cin >> k;
    ll x= lcm(360,k);
    ll d= x/k;
    cout<< d<<endl;

    return 0;

Compiler output:
a.cc:10:1: error: expected initializer before 'int'
   10 | int main() {
      | ^~~
Language: Java

import java.util.*;

public class Contest200620 {

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();
	        boolean is360 = false;
	        int n = 1;
	        
	        while (!is360) 
	        	if (n*x % 360 != 0) {
	        		n++;
	        	}else {
	        		is360 = true;
	        	}
	        	
	        
	       
	        System.out.println(n);
	}
}

Compiler output:
Main.java:3: error: class Contest200620 is public, should be declared in a file named Contest200620.java
public class Contest200620 {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int x;
	cin>>x;
  if(x>179 && x<1)
    return ;
	cout<<360/x;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
    8 |     return ;
      |     ^~~~~~
Language: Java


import java.util.Scanner;

public class A_TheStrider {

	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int x = sc.nextInt();
		System.out.println(((int)Math.ceil(360/x)));
	}

}


Compiler output:
Main.java:4: error: class A_TheStrider is public, should be declared in a file named A_TheStrider.java
public class A_TheStrider {
       ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int X;
    int K ;
    cin >> X 
    //Xto360nosaishoukoubasisu
    int ans;
    for(int i=1;i < 180;i++){
        ans =i*360;
        if(360%X==0){
            break;
        }
    }
    cout << ans/X<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'int'
    7 |     cin >> X
      |             ^
      |             ;
    8 |     //Xto360nosaishoukoubasisu
    9 |     int ans;
      |     ~~~      
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         ans =i*360;
      |         ^~~
      |         abs
a.cc:16:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |     cout << ans/X<<endl;
      |             ^~~
      |             abs
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int X;
    int K ;
    cin >> X 
    //Xto360nosaishoukoubasisu
    int ans;
    for(int i=1;i < 180;i++){
        ans =i*360;
        if(360%X==0){
            break;
        }
    }
    cout << 360/X<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'int'
    7 |     cin >> X
      |             ^
      |             ;
    8 |     //Xto360nosaishoukoubasisu
    9 |     int ans;
      |     ~~~      
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         ans =i*360;
      |         ^~~
      |         abs
Language: C++

#include <algorithms>
#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[])
{
  int X;
  cin >>X;
  cout << 360/X;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: algorithms: No such file or directory
    1 | #include <algorithms>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n;
	cin>>n;
	cout<<(360/n)<<endls;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'endls' was not declared in this scope
    8 |         cout<<(360/n)<<endls;
      |                        ^~~~~
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
int main()
{
	int x;
	cin>>x;
  if(x>179 && x<1)
    return;
	cout<<360/x;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
    8 |     return;
      |     ^~~~~~
Language: C++

#include <stdhio.h>
#include <math.h>
int main() {

	double X;
	double a;
	a = eil(360 / X);


	printf("%d",a);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdhio.h: No such file or directory
    1 | #include <stdhio.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Main{
    public static main(String args[]){
        Scanner sc = new Scanner(System.in);
      
      	int x = sc.nextInt();
      
      	int a = 1;
      
      	int b = 0;
      	int k = 0;
        while(a == 0){
            k += 360;
        	a = k % x;
        }
          	b = k / x;
      
      	System.out.print(b);
    }
}

Compiler output:
Main.java:4: error: invalid method declaration; return type required
    public static main(String args[]){
                  ^
1 error
Language: C++

x = gets.to_i

r = x/360r
o = r
n = 1
while o.to_i != o
  n += 1
  o += r
end

p n


Compiler output:
a.cc:3:1: warning: large fixed-point constant implicitly truncated to fixed-point type [-Woverflow]
    3 | r = x/360r
      | ^
a.cc:1:1: error: 'x' does not name a type
    1 | x = gets.to_i
      | ^
Language: C++

#include<bits/stdc++.h>
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl '\n'
#define pb push_back
#define ll long long
#define ull unsigned long long
#define vi vector<int>
using namespace std;
constexpr int MOD=1e9+7;



int main() {
    int x ;
    cin >> x ;
    if(360^%x==0)
    cout << 360 / x ;
    else
    cout << 360 ;  


    
    
    
    return 0 ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected primary-expression before '%' token
   16 |     if(360^%x==0)
      |            ^
Language: C++

/*Arnab's Code
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define vll vector<ll>
#define vii vector<int>
#define pll pair<ll,ll>
#define pii pair<int,int>
#define take(a,n) for(ll i=0;i<n;i++)cin>>a[i]
#define takes(a,n,st) for(ll i=st;i<n+st;i++)cin>>a[i]
ll sum(ll a[],ll n,ll s){ for(ll i=0;i<n;i++)s+=a[i]; return s;}
#define mod 1000000009
ll power(ll x, ll y, ll p)  {  
    ll res = 1;  
    x = x % p;   
    if (x == 0) return 0;  
    while (y > 0){  
        if (y & 1)  
            res = (res*x) % p;  
        y = y>>1;
        x = (x*x) % p;  
    }  
    return res;  
}
void solve(){
	ll n;
	cin>>n;
	cout<<360/(__gcd(n,360));
	return;
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif
	ll t,T;
	cin>>T;
	T=1;
	for(t=1;t<=T;t++){
//		cout<<"Case #"<<t<<": ";
		solve();
	}
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:31:25: error: no matching function for call to '__gcd(long long int&, int)'
   31 |         cout<<360/(__gcd(n,360));
      |                    ~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:31:25: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   31 |         cout<<360/(__gcd(n,360));
      |                    ~~~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int x;
cin>>x;
if(360%x==0)
cout<<360/x;
else
cout<<360/__gcd(360,x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: '__gcd' was not declared in this scope
   10 | cout<<360/__gcd(360,x);
      |           ^~~~~
Language: C

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
#define pb push_back
#define pp pop_back
#define ubo upper_bound
#define lbo lower_bound
#define VI vector<int>
#define VL vector<ll>
#define VP vector<pii >
#define all(x) x.begin(), x.end()
#define M vector<VI >

using namespace std;

int gcd(int a, int b){
	if(!b) return a;
	return gcd(b, a%b);
}

int main(){

	int x, ek = 360;
	cin >> x;

	cout << ek/gcd(x, ek) << '\n';

	return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <vector>
#define MOD 1000000007

using namespace std;
typedef long long ll;

template <typename T>
T gcd(T a, T b) {
	if (a < b) swap(a, b);
		while (b != 0) {
			T tmp = b;
			b = a % b;
			a = tmp;
		}
	return a;
}

template <typename T>
T lcm(T a, T b) {
  	return (a * b) / gcd<T>(a, b);
}

template <typename T>
T pow(T a, ll n) {
	T ans = 1;
	T tmp = a;
	for (int i = 0; i <= 60; i++) {
		ll m = (ll)1 << i;
		if (m & n) {
		ans *= tmp;
		ans %= MOD;
		}
		tmp *= tmp;
		tmp %= MOD;
	}
	return ans;
}

template <typename T>
vector<T> divs(T N) {
	vector<T> ans;
	for (int i = 1; i * i <= N; i++) {
		if (N % i == 0) {
		ans.push_back(i);
		if (i * i != N) ans.push_back(N / i);
		}
	}
	return ans;
}

template <typename T>
vector<T> prime_facs(T N) {
	vector<T> ans;
	for (int i = 2; i * i <= N; i++) {
		if (N % i == 0) {
		ans.push_back(i);
		while (N % i == 0) {
			N /= i;
		}
		}
	}
	if (N != 1) ans.push_back(N);
	return ans;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

const int isDebugMode = 1;
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
struct edge{long long to,cost;};
const int inf = 1 << 27;
const long long INF = 1LL << 60;
const int COMBMAX = 1001001;
const long long MOD = 1000000007;
const long long dy[] = {-1, 0, 0, 1};
const long long dx[] = {0, -1, 1, 0};
string abc = "abcdefghijklmnopqrstuvwxyz";
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define eachdo(v, e) for (const auto &e : (v))
#define all(v) (v).begin(), (v).end()
#define lower_index(v, e) (long long)distance((v).begin(), lower_bound((v).begin(), (v).end(), e))
#define upper_index(v, e) (long long)distance((v).begin(), upper_bound((v).begin(), (v).end(), e))
long long mpow(long long a, long long n, long long mod = MOD){long long res = 1; while(n > 0){if(n & 1)res = res * a % mod; a = a * a % mod; n >>= 1;} return res;}
void pt(){cout << endl; return;}
template<class Head> void pt(Head&& head){cout << head; pt(); return;}
template<class Head, class... Tail> void pt(Head&& head, Tail&&... tail){cout << head << " "; pt(forward<Tail>(tail)...);}
void dpt(){if(!isDebugMode) return; cout << endl; return;}
template<class Head> void dpt(Head&& head){if(!isDebugMode) return; cout << head; pt(); return;}
template<class Head, class... Tail> void dpt(Head&& head, Tail&&... tail){if(!isDebugMode) return; cout << head << " "; pt(forward<Tail>(tail)...);}
template<class T> void debug(T v){if(!isDebugMode) return; rep(i, v.size()) cout << v[i] << " " ; cout << endl;}
template<class T> void debug2(T v){if(!isDebugMode) return; rep(i, v.size()){rep(j, v[i].size()) cout << v[i][j] << " " ; cout << endl;}}
template<class T1, class T2> inline bool chmin(T1 &a, T2 b){if(a > b){a = b; return true;} return false;}
template<class T1, class T2> inline bool chmax(T1 &a, T2 b){if(a < b){a = b; return true;} return false;}
template<class T1, class T2> long long gcd(T1 a, T2 b){return a % b ? gcd(b , a % b) : b;}
template<class T1, class T2> void reduce(T1 &a, T2 &b){ll g = gcd(a, b); a /= g; b /= g; return;}
bool valid(long long H, long long W, long long h, long long w) { return 0 <= h && h < H && 0 <= w && w < W; }

int main(){
    ll X; cin >> X;
    pt((360 * X / gcd(X, (ll)360)) / X);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: call of overloaded 'gcd(ll&, ll)' is ambiguous
   36 |     pt((360 * X / gcd(X, (ll)360)) / X);
      |                   ~~~^~~~~~~~~~~~
a.cc:30:40: note: candidate: 'long long int gcd(T1, T2) [with T1 = long long int; T2 = long long int]'
   30 | template<class T1, class T2> long long gcd(T1 a, T2 b){return a % b ? gcd(b , a % b) : b;}
      |                                        ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:2:
/usr/include/c++/14/numeric:173:5: note: candidate: 'constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn) [with _Mn = long long int; _Nn = long long int; common_type_t<_Mn, _Nn> = long long int]'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
Language: C++

const int isDebugMode = 1;
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<long long, long long> P;
struct edge{long long to,cost;};
const int inf = 1 << 27;
const long long INF = 1LL << 60;
const int COMBMAX = 1001001;
const long long MOD = 1000000007;
const long long dy[] = {-1, 0, 0, 1};
const long long dx[] = {0, -1, 1, 0};
string abc = "abcdefghijklmnopqrstuvwxyz";
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define eachdo(v, e) for (const auto &e : (v))
#define all(v) (v).begin(), (v).end()
#define lower_index(v, e) (long long)distance((v).begin(), lower_bound((v).begin(), (v).end(), e))
#define upper_index(v, e) (long long)distance((v).begin(), upper_bound((v).begin(), (v).end(), e))
long long mpow(long long a, long long n, long long mod = MOD){long long res = 1; while(n > 0){if(n & 1)res = res * a % mod; a = a * a % mod; n >>= 1;} return res;}
void pt(){cout << endl; return;}
template<class Head> void pt(Head&& head){cout << head; pt(); return;}
template<class Head, class... Tail> void pt(Head&& head, Tail&&... tail){cout << head << " "; pt(forward<Tail>(tail)...);}
void dpt(){if(!isDebugMode) return; cout << endl; return;}
template<class Head> void dpt(Head&& head){if(!isDebugMode) return; cout << head; pt(); return;}
template<class Head, class... Tail> void dpt(Head&& head, Tail&&... tail){if(!isDebugMode) return; cout << head << " "; pt(forward<Tail>(tail)...);}
template<class T> void debug(T v){if(!isDebugMode) return; rep(i, v.size()) cout << v[i] << " " ; cout << endl;}
template<class T> void debug2(T v){if(!isDebugMode) return; rep(i, v.size()){rep(j, v[i].size()) cout << v[i][j] << " " ; cout << endl;}}
template<class T1, class T2> inline bool chmin(T1 &a, T2 b){if(a > b){a = b; return true;} return false;}
template<class T1, class T2> inline bool chmax(T1 &a, T2 b){if(a < b){a = b; return true;} return false;}
template<class T1, class T2> long long gcd(T1 a, T2 b){return a % b ? gcd(b , a % b) : b;}
template<class T1, class T2> void reduce(T1 &a, T2 &b){ll g = gcd(a, b); a /= g; b /= g; return;}
bool valid(long long H, long long W, long long h, long long w) { return 0 <= h && h < H && 0 <= w && w < W; }

int main(){
    ll X; cin >> X;
    pt((360 * X / gcd(X, 360)) / X);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: call of overloaded 'gcd(ll&, int)' is ambiguous
   36 |     pt((360 * X / gcd(X, 360)) / X);
      |                   ~~~^~~~~~~~
a.cc:30:40: note: candidate: 'long long int gcd(T1, T2) [with T1 = long long int; T2 = int]'
   30 | template<class T1, class T2> long long gcd(T1 a, T2 b){return a % b ? gcd(b , a % b) : b;}
      |                                        ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:2:
/usr/include/c++/14/numeric:173:5: note: candidate: 'constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn) [with _Mn = long long int; _Nn = int; common_type_t<_Mn, _Nn> = long long int]'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~