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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
using namespace std;
using ll = long long;
map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> x;
  int cnt=0;
  while(x>0){
    cnt++;
    if(cnt%2==1){
      x-=6;
    }else{
      x-=5;
    }
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 'x' was not declared in this scope
   22 |   cin >> x;
      |          ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
    long long x, point = 0, count = 0;
    cin >> x;
    while (1)
    {
        if (x < 1000000000)
        {

            if (point < x)
            {
                point += 6;
                count++;
            }
            else
                break;
            if (point < x)
            {
                point += 5;
                count++;
            }
            else
                break;
        }
        else
        {
            point += 999999990;
            cout+=90909090;
        }
    }
    cout << count;
}
//999999990

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: no match for 'operator+=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
   30 |             cout+=90909090;
      |             ~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<set>
#include<vector>
#include<string>
#include<iostream>
using namespace std;
int main(){
LL x;
cin>>x;
if(x%11>=1&&x%11<=6){
cout<<x/11*2+1<<endl;
}
else if(x%11==0){
cout<<x/11*2<<endl;
}
else{
cout<<x/11*2+2<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'LL' was not declared in this scope
   10 | LL x;
      | ^~
a.cc:11:6: error: 'x' was not declared in this scope
   11 | cin>>x;
      |      ^
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<set>
#include<vector>
#include<string>
#include<iostream>
using namespace std;
int main(){
int x;
cin>>x;
if(x%11>=1&&x%11<=5){
cout<<x/11*2+1<<endl;
}
else if(x%11==0){
cout<<x/11*2<<endl;
}
else{
cout<<x/11*2+2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
long long x,ans;

int main(){
	cin>>x;
	ans+=(x/11)*2;
	x%=11;
 	if(x!=0){
		if(x>6){
			cout<<ans+2<<endl;
		}else{
			cout<<ans+1<<endl;
        }
	}else{
		cout<<a<<endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'a' was not declared in this scope
   18 |                 cout<<a<<endl;
      |                       ^
Language: C++

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

int main() {
   ll x;
   cin >> x;
   ll a = (x / 11) * 2;
   x %= 11;

   if (x == 0) {
      cout << a << endl;
   } else if (x <= 6) {
      cout << a + 1 << endl;
   } else {
      cout << a + 2 << endl;
   }

   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'll' was not declared in this scope
    5 |    ll x;
      |    ^~
a.cc:6:11: error: 'x' was not declared in this scope
    6 |    cin >> x;
      |           ^
a.cc:7:6: error: expected ';' before 'a'
    7 |    ll a = (x / 11) * 2;
      |      ^~
      |      ;
a.cc:11:15: error: 'a' was not declared in this scope
   11 |       cout << a << endl;
      |               ^
a.cc:13:15: error: 'a' was not declared in this scope
   13 |       cout << a + 1 << endl;
      |               ^
a.cc:15:15: error: 'a' was not declared in this scope
   15 |       cout << a + 2 << endl;
      |               ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

typedef long long ll;
int main()
{
  ll n; cin>>n;
  if(n<=6){
    cout<<1<<"\n"; return 0;
  }
  if(n<=11){
    cout<<2<<"\n"; return 0;
  }
  if(n%11<6) cout<<ans*2+1<<"\n";
  else cout<<ans*2+2<<"\n";

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |   if(n%11<6) cout<<ans*2+1<<"\n";
      |                    ^~~
      |                    abs
a.cc:16:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   else cout<<ans*2+2<<"\n";
      |              ^~~
      |              abs
Language: C++

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

int main() {
  long long x; cin >> x;
  long long ans = x/11;
  if (x % 11 == 0) ans = 2*ans;
  else (x%11 <= 6 ) ans = 2*ans + 1;
  else ans = 2*ans + 2;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before 'ans'
    8 |   else (x%11 <= 6 ) ans = 2*ans + 1;
      |                    ^~~~
      |                    ;
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else ans = 2*ans + 2;
      |   ^~~~
Language: C

#include <stdio.h>
int main(void)
{int A,B,C,D,N,K,S,X,Y,Z,k,x,l,tmp;
	long long int x,m,i;
	scanf("%lld",&x);
	m=x/11;
	i=x%11;
	if(i>=7)
	printf("%lld",m*2+2);
	else
	printf("%lld",m*2+1);
	
	


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:23: error: conflicting types for 'x'; have 'long long int'
    4 |         long long int x,m,i;
      |                       ^
main.c:3:28: note: previous declaration of 'x' with type 'int'
    3 | {int A,B,C,D,N,K,S,X,Y,Z,k,x,l,tmp;
      |                            ^
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long x = sc.nextLong();
		long ans = 0;
		if(x % 11 <= 6) ans = x / 11 * 2 + 1;
		else ans = x / 11 * 2 + 2;
		System.out.println(ans);
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <numeric>

#define FOR(i, f, n) for(int (i) = (f); (i) < (n); (i)++)
#define RFOR(i, f, n) for(int (i) = (f); (i) >= (n); (i)--)
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for(int (i) = (n); (i) >= 0; (i)--)
#define step(i, f, n, a) for(int (i) = (f); (i) < (n); (i)+=a)
#define rstep(i, f, n, a) for(int (i) = (f); (i) >= (n); (i)-=a)
#define p(...) printf(__VA_ARGS__); cout << endl;
#define gets(x) x; cin >> x;
#define puts(x) x; cout << x << endl;
#define list_input(x, n) x[(n)]; for(int (i) = 0; (i) < (n); (i)++) cin >> x[i];
#define lambda(a, b, c) [](const a, const b){ return c ;}
#define key(t, x, compare) [](const t& a, const t& b){ return a x compare b x ;}

using ll = long long;
using namespace std;

using pii = pair<int, int>;

int main(){
  ll x, ans;
  double result;
  gets(x)
  result = (x/11.0)*2;
  ans = ceil(result);
  puts(ans)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: error: 'ceil' was not declared in this scope
   35 |   ans = ceil(result);
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main (){
  ll x;
  cin >> x;
  ll ans = 0;
  ans += ((x-1)/11)*2;
  (x-1)%=11;
  if(x<=6){
    ans++;
  }else{
    ans += 2;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: lvalue required as left operand of assignment
    9 |   (x-1)%=11;
      |   ~~^~~
Language: C++

// die.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>

using namespace std;

int main()
{
	long long x;
	cin >> x;
	if (x <= 6)
		cout << "1" << endl;
	else if(x == 7)
		cout << "3" << endl;
	else if(x > 7 && x <= 11)
		cout << "2" << endl;
	else
	{
		long long int n = x - (x / 11) * 11;
		if (n < 7 && n != 0)
			cout << (x / 11) * 2 + 1<< endl;
		else if (!n)cout << (x / 11) * 2 << endl;
		else cout << (x / 11)*2 + 2 << endl;
	}
    return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

int main()
{
	__int64 x;
	cin >> x;

	__int64 times = x / 11;
	__int64 a = x % 11;

	__int64 add = 0;
	if (a){
		add = 1;
		if (a > 6){
			add = 2;
		}
	}
	cout << times*2+add;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    6 |         __int64 x;
      |         ^~~~~~~
      |         __int64_t
a.cc:7:16: error: 'x' was not declared in this scope
    7 |         cin >> x;
      |                ^
a.cc:9:16: error: expected ';' before 'times'
    9 |         __int64 times = x / 11;
      |                ^~~~~~
      |                ;
a.cc:10:16: error: expected ';' before 'a'
   10 |         __int64 a = x % 11;
      |                ^~
      |                ;
a.cc:12:16: error: expected ';' before 'add'
   12 |         __int64 add = 0;
      |                ^~~~
      |                ;
a.cc:13:13: error: 'a' was not declared in this scope
   13 |         if (a){
      |             ^
a.cc:14:17: error: 'add' was not declared in this scope
   14 |                 add = 1;
      |                 ^~~
a.cc:19:17: error: 'times' was not declared in this scope; did you mean 'timex'?
   19 |         cout << times*2+add;
      |                 ^~~~~
      |                 timex
a.cc:19:25: error: 'add' was not declared in this scope
   19 |         cout << times*2+add;
      |                         ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

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

    int n = (x / 11) * 2;
    int l = x % 11;

    if (l > 6)
        n += 2;
    else if (l > 0)
        n += 1;

    cout << n << endl;

    return 0;
}
#include <iostream>
#include <string>
#include <vector>

using namespace std;

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

    int n = (x / 11) * 2;
    int l = x % 11;

    if (l > 6)
        n += 2;
    else if (l > 0)
        n += 1;

    cout << n << endl;

    return 0;
}


Compiler output:
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
Language: C++

# -*- coding: utf-8 -*-
x = input()
q = (x/11)*2
r = x-11*q
if(r<=6):
    print(q+1)
else:
    print(q+2)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:1: error: 'x' does not name a type
    2 | x = input()
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	
	int x,b,c,y;
 
	cin>>x;
	b=x/11;
	c=x%11;
	if(c==0){y=b*2;}
	else if (c>0 && c<7){y=b*2+1;}
	else {y=b*2+2;}
	cout<<y<<endl;
	}
	return 0;
	}


Compiler output:
a.cc:16:9: error: expected unqualified-id before 'return'
   16 |         return 0;
      |         ^~~~~~
a.cc:17:9: error: expected declaration before '}' token
   17 |         }
      |         ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	
	int x,b,c,y;
	b=x/11
	c=x%11
	
	cin>>x;
	if(c==0)y=b*2;
	if(c>0 && c>7)y=b*2+1
	if(c>=7)y=b*2+2
	cout<<y<<endl;
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'c'
    7 |         b=x/11
      |               ^
      |               ;
    8 |         c=x%11
      |         ~      
a.cc:12:30: error: expected ';' before 'if'
   12 |         if(c>0 && c>7)y=b*2+1
      |                              ^
      |                              ;
   13 |         if(c>=7)y=b*2+2
      |         ~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
int a,b,c;
int main(void){
scanf("%d",&a);
 b=a/11;
 c=a%11;
 if(c==0){
 c=0;
 }else if(c<=6){
 c=1;
 }else {
 c=2;
 }
 printf("%d",b+c);
 return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: expected '}' at end of input
   16 |  return 0;
      |           ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include<stdio.h>
#include<stdlib.h>
int a,b,c;
int main(void){
scanf("%d",&a);
 b=a/11;
 c=a%11;
 if(c==0){
 c=0;
 }else if(c<=0){
 c=0;
 }else if{
 c=2;
 }
 printf("%d",b+c);
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected '(' before '{' token
   12 |  }else if{
      |          ^
      |          (
Language: C++

#include<stdio.h>
#include<stdlib.h>
int a,b,c;
int main(void){
scanf("%d",&a);
 b=a/11;
 c=a%11;
 if(c==0){
 c=0;;
 }else(c<=0){
 c=0;
 }else{
 c=2;
 }
 printf("%d",b+c);
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before '{' token
   10 |  }else(c<=0){
      |             ^
      |             ;
a.cc:12:3: error: 'else' without a previous 'if'
   12 |  }else{
      |   ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
int a,b,c;
int main(void){
scanf("%d",&a);
 b=a/11;
 c=a%11;
 if(c<=6&&c>0){
 c=1;
 }if(c==0){
 c=0;
 }else{
 c=2;
 }
 printf("%d",b+c)
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before 'return'
   15 |  printf("%d",b+c)
      |                  ^
      |                  ;
   16 |  return 0;
      |  ~~~~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
int a,b,c;
int main(void){
scanf("%d",&a);
 b=a/11
 c=a%11
 if(c<=6&&c>0){
 c=1
 }if(c==0){
 c=0
 }else{
 c=2
 }
 printf("%d",b+c)
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected ';' before 'c'
    6 |  b=a/11
      |        ^
      |        ;
    7 |  c=a%11
      |  ~      
a.cc:11:5: error: expected ';' before '}' token
   11 |  c=0
      |     ^
      |     ;
   12 |  }else{
      |  ~   
a.cc:13:5: error: expected ';' before '}' token
   13 |  c=2
      |     ^
      |     ;
   14 |  }
      |  ~   
a.cc:15:18: error: expected ';' before 'return'
   15 |  printf("%d",b+c)
      |                  ^
      |                  ;
   16 |  return 0;
      |  ~~~~~~
Language: C++

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

int main()
{
    LL x;
    scanf("%lld", &x);
    if(x<7) puts("1");
    else
    {
         LL rem = x-6;
         LL ans = rem/11*2+1;
         int s = rem%11;
         if(s>5) ans+=2;
         else if(s>0) ans+=1;
         printf("lld\n", ans);
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'LL' was not declared in this scope
    6 |     LL x;
      |     ^~
a.cc:7:20: error: 'x' was not declared in this scope
    7 |     scanf("%lld", &x);
      |                    ^
a.cc:11:12: error: expected ';' before 'rem'
   11 |          LL rem = x-6;
      |            ^~~~
      |            ;
a.cc:12:12: error: expected ';' before 'ans'
   12 |          LL ans = rem/11*2+1;
      |            ^~~~
      |            ;
a.cc:13:18: error: 'rem' was not declared in this scope; did you mean 'drem'?
   13 |          int s = rem%11;
      |                  ^~~
      |                  drem
a.cc:14:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |          if(s>5) ans+=2;
      |                  ^~~
      |                  abs
a.cc:15:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |          else if(s>0) ans+=1;
      |                       ^~~
      |                       abs
a.cc:16:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |          printf("lld\n", ans);
      |                          ^~~
      |                          abs
Language: Java

import java.util.*;
public class ABC053_C {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long x=sc.nextLong(),sum=0;
		sum=x/11*2;
		if(x%11>6)sum+=2;
		else sum+=1;
		System.out.println(sum);
	}
}

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

#include <iostream>

// 奇数: 6, 17, 28,  ... 11n-5
// 偶数: 11, 22, 33 ... 11n

11n-5 >= x -> n >= (x+5)/11
11n >= x -> n >= x/11

int main(){
unsigned long int x;

std::cin >> x;

unsigned long int odd = (x+5)/11;
unsigned long int even = x/11;

if ((x+5)%11 != 0){
odd += 1;
}

if (x%11 != 0){
even += 1;
}

if (odd <= even){
std::cout << 2*odd-1 << std::endl;
}
else {
std::cout << 2*even << std::endl;
}

return 0;
}

Compiler output:
a.cc:6:1: error: expected unqualified-id before numeric constant
    6 | 11n-5 >= x -> n >= (x+5)/11
      | ^~~
Language: C++

int main(){
    
    long a = 0;
    long goal;
    
    cin >> goal;
    
    a = (goal/11)*2;
    
    if (goal%11 <= 6)
        cout << a + 1 << endl;
    else
        cout << a +2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> goal;
      |     ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << a + 1 << endl;
      |         ^~~~
a.cc:11:26: error: 'endl' was not declared in this scope
   11 |         cout << a + 1 << endl;
      |                          ^~~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << a +2 << endl;
      |         ^~~~
a.cc:13:25: error: 'endl' was not declared in this scope
   13 |         cout << a +2 << endl;
      |                         ^~~~
Language: Java

import java.util.Scanner;

public class Contest053_C {

		public static void main(String[] args) {
			
	        Scanner scan = new Scanner(System.in);
	        String line =  scan.next();
	        
			Long number = Long.parseLong(line);
			Long getNumber = number/6;
			if (number<=6){
				System.out.print(1);
			} else if (number%6==0){
				System.out.println(getNumber);        
			} else {
				System.out.println(getNumber+1);
			}
}
}

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

import java.util.Scanner;

public class Main {

		public static void main(String[] args) {
			
	        　　Scanner scan = new Scanner(System.in);
	       　　 String line =  scan.next();
	        
			Long number = Long.parseLong(line);
			Long getNumber = number/6;
			if (number<=6){
				System.out.print(1);
			} else if (number%6==0){
				System.out.println(getNumber);        
			} else {
				System.out.println(getNumber+1);
			}
}
}

Compiler output:
Main.java:7: error: illegal character: '\u3000'
	        ??Scanner scan = new Scanner(System.in);
	        ^
Main.java:7: error: illegal character: '\u3000'
	        ??Scanner scan = new Scanner(System.in);
	         ^
Main.java:8: error: illegal character: '\u3000'
	       ?? String line =  scan.next();
	       ^
Main.java:8: error: illegal character: '\u3000'
	       ?? String line =  scan.next();
	        ^
4 errors
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                int number = scan.next();
		
		int count=1;
		if (number<=6){
			System.out.print(1);
		}
		
		while(number>6){
			number = number-6;
			count++;
		}
		System.out.print(count);
		

	}

}


Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to int
                int number = scan.next();
                                      ^
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                int number = Integer.parseInt(scan);
		
		int count=1;
		if (number<=6){
			System.out.println(1);
		}
		
		while(number>6){
			number = number-6;
			count++;
		}
		System.out.println(count);
		

	}

}


Compiler output:
Main.java:7: error: incompatible types: Scanner cannot be converted to String
                int number = Integer.parseInt(scan);
                                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <iostream>

using namespace std;

int main()
{
  long long n;
  cin >> n;

  / if (n < 6) {
  //   cout << "1" << endl;
  //   return 0;
  // }

  long long  m;
  int r;
  m = n / 11;
  r = n % 11;
  if (r == 0) {
    cout << 2 * m;
  } else if (r <= 6) {
    cout << 2*m + 1;
  } else {
    cout << 2*m + 2;
  }
  return 0;
  
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before '/' token
   10 |   / if (n < 6) {
      |   ^
a.cc:10:5: error: expected primary-expression before 'if'
   10 |   / if (n < 6) {
      |     ^~
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>//cout
#include <stdio.h>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <functional>
#include <list>
#include <utility>//swap
using namespace std;
static const int MAX = 200000;
#define rep(i,n) for(int i=0;i<n;i++)
#define GET_ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))

int main() {
  long long int x;
  cin >> x;
  long long int k = x/11;
  long long int m = x%11;
  if(0<m<7){
    cout << 1 + 2*k << endl;
  } else if()m == 0 {
    cout << 2*k << endl;
    } else {
    cout << 2 + 2*k << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: expected primary-expression before ')' token
   24 |   } else if()m == 0 {
      |             ^
a.cc:24:20: error: expected ';' before '{' token
   24 |   } else if()m == 0 {
      |                    ^~
      |                    ;
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Beg54A {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String input = "2";
		try {
			input = br.readLine();
		} catch (IOException e) {
		}

		long out = 0;
		long K = Long.valueOf(input);
		if (K == 1) {
			out = 1;
		} else if (2 < K && K <= 7) {
			out = 2;
		} else {

			long K1 = Long.valueOf(input) - 5;
			long M1 = Math.max(K1/11,-1) + 1;
			long L1 = Long.MIN_VALUE;
			L1 = M1 * 2 + 1;

			long K2 = Long.valueOf(input) - 6;
			long L2 = Long.MIN_VALUE;
			long M2 = Math.max(K2/11,-1) + 1;
			L2 = M2 * 2 + 1;

			long K3 = Long.valueOf(input);
			long M3 = Math.max(K3/11,-1) + 1;
			long L3 = Long.MIN_VALUE;
			L3 = M3 * 2;
			
			out = Math.min(L3,Math.min(L1,  L2));
		}
		System.out.print(out);
	}
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Beg54A {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String input = "2";
		try {
			input = br.readLine();
		} catch (IOException e) {
		}

		long out = 0;
		long K = Long.valueOf(input);
		if (K == 1) {
			out = 1;
		} else if (2 < K && K <= 7) {
			out = 2;
		} else {
			long K1 = Long.valueOf(input) - 5;
			long M1 = Math.max(K1/11,-1) + 1;
			long L1 = Long.MIN_VALUE;
			L1 = M1 * 2 + 1;

			long K2 = Long.valueOf(input) - 6;
			long L2 = Long.MIN_VALUE;
			long M2 = Math.max(K2/11,-1) + 1;
			L2 = M2 * 2 + 1;

			out = Math.min(L1,  L2);
		}
		System.out.print(out);
	}
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Beg54A {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String input = "2";
		try {
			input = br.readLine();
		} catch (IOException e) {
		}

		long out = 0;
		long K = Long.valueOf(input);
		if (K == 1) {
			out = 1;
		} else if (2 < K && K <= 7) {
			out = 2;
		} else {
			long K1 = Long.valueOf(input) - 1;
			long M1 = Math.max(K1/11,-1) + 1;
			long L1 = Long.MIN_VALUE;
			L1 = M1 * 2 + 1;

			long K2 = Long.valueOf(input) - (1 + 5);
			long L2 = Long.MIN_VALUE;
			long M2 = Math.max(K2/11,-1) + 1;
			L2 = M2 * 2 + 2;

			long K3 = Long.valueOf(input) - (1 + 6);
			long M3 = Math.max(K3/11,-1) + 1;
			long L3 = M3 * 2 + 1;
			out = Math.min(Math.min(L1,  L2), L3);
		}
		System.out.print(out);
	}
}


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

#include<iostream>
#include<string>
using namespace std;
int main() {
	unsigned long long  x, n;
	cin >> x;
 
	if (x % 11 == 0) {
		n = 2 * (x / 11);
	}
	else if (x % 11 <= 6) {
		n = 2 * (x / 11) + 1;
	}
	else {
		n = 2 * (x / 11) + 2;
	}
 
 
	cout << n << endl;
 
	return 0;
}

Compiler output:
a.cc:7:1: error: extended character   is not valid in an identifier
    7 |  
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |  
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |  
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |  
      | ^
a.cc: In function 'int main()':
a.cc:7:1: error: '\U000000a0' was not declared in this scope
    7 |  
      | ^
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else if (x % 11 <= 6) {
      |         ^~~~
a.cc:17:2: error: expected ';' before '\U000000a0'
   17 |  
      |  ^
      |  ;
   18 |  
      | ~ 
a.cc:20:2: error: expected ';' before 'return'
   20 |  
      |  ^
      |  ;
   21 |         return 0;
      |         ~~~~~~
Language: C++

#ifdef __GNUC__
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#endif

#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>
#include <stdio.h>

#include <sstream>
#include <algorithm>
#include <cmath>

#include <string>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>

#include <queue>
#include <complex>
#include <set>
#include <map>
#include <stack>
#include <list>

#include <cassert>//assert();
#include <fstream>
/////////
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)

/////////
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
#define PII pair<int,int>
/////////
using namespace::std;

// 最大公約数
template<class T>
inline T gcd(T a, T b){return b == 0 ? a : gcd(b, a % b);}
// 最小公倍数
template<class T>
inline T lcm(T a, T b){return a * b / gcd(a, b);}
////////////////////////////////

inline void solve(){
	ULL X;
	cin >> X;
	ULL Q,R;
	Q = X/11;
	R = X%11;
	ULL ANS;
	if( R > 6 ){
		ANS = 2;
	}else if( R > 0{
		ANS = 1;
	}
	ANS += Q*2;
	cout << ANS;
}

int main(void){
	std::cin.tie(0);
	std::ios::sync_with_stdio(false);
	std::cout << std::fixed;//小数を10進数表示
	cout << setprecision(16);//小数をいっぱい表示する。16?

	solve();

	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:60:24: error: expected ';' before '{' token
   60 |         }else if( R > 0{
      |                        ^
      |                        ;
a.cc:63:19: error: expected ')' before ';' token
   63 |         ANS += Q*2;
      |                   ^
      |                   )
a.cc:60:17: note: to match this '('
   60 |         }else if( R > 0{
      |                 ^
Language: C++

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


int main(){
	long long n,a;
	cin >> n;
	a = n/11*2;
	if(n%11){
		a++;
		if(x%11>6) a++;
	}
	cout << a << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'x' was not declared in this scope
   11 |                 if(x%11>6) a++;
      |                    ^
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn = 2e5+10;
long long n;
int main(){
    cin>>n;
    long long ans = (n/11)*2;
    if(n% 11 == 0)   ans = ans;
    else if(n%11 <= 6 )   ans = ans+1;
    else if  ans = ans+2;
    cout << ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected '(' before 'ans'
   12 |     else if  ans = ans+2;
      |              ^~~
      |              (
Language: Java

import java.util.Scanner;

public class Solution {
	public static void main(String[] args) {
		long target = 0;
		Scanner sc = new Scanner(System.in);
		target = sc.nextLong();

		long res = (long) Math.floor(target / 11) * 2;
		long l2 = target % 11;
		if (target > 6) {
			res += 2;
		} else if (target > 1){
			res += 1;
		}
		
		System.out.println(res);
	}
}


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: Java

import java.util.Scanner;

public class ProblemC {
	public static void main(String[] args) {
		long target = 0;
		Scanner sc = new Scanner(System.in);
		target = sc.nextLong();

		long res = (long) Math.floor(target / 11) * 2;
		long l2 = target % 11;
		if (target > 6) {
			res += 2;
		} else if (target > 1){
			res += 1;
		}
		
		System.out.println(res);
	}
}


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

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#include <cmath>

#define _USE_MATH_DEFINES
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define INF 999999999;
#define atcoder 1000000007;

using namespace std;

int main(){

	int N, a, max = 0, cnt = 0, ans = 0;
	int A[100000] = { 0 };

	cin >> N;
	REP(i, N) {
		cin >> a;
		A[a]++;
		if (max < a)
			max = a;
	}

	REP(i, max) {
		if (A[i] > 1) {
			cnt++;
			ans += A[i] - 1;
		}
	}


	if (ans % 2 == 0) {
		cout << N - ans << endl;
	}
	else
		cout << N - ans - 1 << endl;

	system("pause");
	return 0;
}

int main() {
	long long int x, ans = 0;

	cin >> x;
	if (x % 11 == 0) {
		ans = 2 * (x / 11);
	}
	else {
		if (x % 11 <= 6)
			ans += 1;
		else
			ans += 2;
		}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:54:5: error: redefinition of 'int main()'
   54 | int main() {
      |     ^~~~
a.cc:23:5: note: 'int main()' previously defined here
   23 | int main(){
      |     ^~~~
Language: Java

import java.util.*;
public class AT2017_1_28_28_3 {
static Scanner sc=new Scanner(System.in);
	public static void main(String[] args) {
		long x=sc.nextLong();
		long n=(long)x/11;
		long m=x%11;
		long result=0;
		if(m==0){
			result=2*n;
		}
		else{
			if(m<=6){
			result=2*n+1;
			}
		else{
			result=2*n+2;
			}
		}
		System.out.println(result);
	}

}

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

#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn = 2e5+10;
long long n;
int main(){
    cin>>n;
    long long ans = (n/11)*2;
    //if(n% 11 == 0)   ans = anss;
    if(n%11 <= 6 && n%11!=0)   ans = anss+1;
    else if(n%11!=0)   ans = anss+2;
    cout << ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:38: error: 'anss' was not declared in this scope; did you mean 'ans'?
   11 |     if(n%11 <= 6 && n%11!=0)   ans = anss+1;
      |                                      ^~~~
      |                                      ans
a.cc:12:30: error: 'anss' was not declared in this scope; did you mean 'ans'?
   12 |     else if(n%11!=0)   ans = anss+2;
      |                              ^~~~
      |                              ans
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int maxn = 2e5+10;
long long n;
int main(){
    scanf("%I64d",&n);
    long long  ans,ans = n/11 *2;
    if(n% 11 == 0)   ans = anss;
    else if(n%11 <= 6)   ans = anss+1;
    else    ans = anss+2;
    printf("%I64d\n",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: redeclaration of 'long long int ans'
    9 |     long long  ans,ans = n/11 *2;
      |                    ^~~
a.cc:9:16: note: 'long long int ans' previously declared here
    9 |     long long  ans,ans = n/11 *2;
      |                ^~~
a.cc:10:28: error: 'anss' was not declared in this scope; did you mean 'ans'?
   10 |     if(n% 11 == 0)   ans = anss;
      |                            ^~~~
      |                            ans
a.cc:11:32: error: 'anss' was not declared in this scope; did you mean 'ans'?
   11 |     else if(n%11 <= 6)   ans = anss+1;
      |                                ^~~~
      |                                ans
a.cc:12:19: error: 'anss' was not declared in this scope; did you mean 'ans'?
   12 |     else    ans = anss+2;
      |                   ^~~~
      |                   ans
Language: C++

#include <iostream>

using namespace std;

int main(){
  unsigned long long int x;
  cin >> x;
  unsigned long long int temp = x / 11;
  unsigned long long int step = 2*temp;
  x = x - step * 11;
  
  if(x >= 1)
    ++step;
  of(x > 6)
    ++step;
  cout << step << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'of' was not declared in this scope
   14 |   of(x > 6)
      |   ^~
Language: C++


﻿#include <bits/stdc++.h>
 
#define MP make_pair
#define PB push_back
#define ALL(x)  (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY))
#define RANGE(x, l, r) ((l) <= (x) && (x) <= (r))
#define rep(i, N)  for (int i = 0; i < (int)(N); i++)
#define rrep(i, N) for (int i = N - 1; i >= 0; i--)
#define REP(i, init, N)  for (int i = (init); i < (int)(N); i++)
#define RREP(i, N, last) for (int i = (init - 1); i >= last; i--)
#define PB push_back
 
using namespace std;
 
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI > VVi;
typedef vector<string> VS;
typedef vector<LL> VLL;
typedef pair<int,int> PII;
 
const int    INF  = 0x3f3f3f3f;
const LL     INFL = 0x3f3f3f3f3f3f3f3fLL;
const double DINF = 0x3f3f3f3f;
 
int main(){
	ios::sync_with_stdio(false);
    long long x,p,t;
cin>>x;
p=x/11;
if(x%11==0){
cout<<p<<endl;
}
else if(x%11<=6){cout<<p+1<<endl;}
else
cout<<p+2<<endl;
 
    return 0;
}

Compiler output:
a.cc:2:1: error: stray '#' in program
    2 | ﻿#include <bits/stdc++.h>
      | ^
a.cc:2:1: error: '\U0000feff' does not name a type
    2 | ﻿#include <bits/stdc++.h>
      |  
a.cc:20:9: error: 'vector' does not name a type
   20 | typedef vector<int> VI;
      |         ^~~~~~
a.cc:21:9: error: 'vector' does not name a type
   21 | typedef vector<VI > VVi;
      |         ^~~~~~
a.cc:22:9: error: 'vector' does not name a type
   22 | typedef vector<string> VS;
      |         ^~~~~~
a.cc:23:9: error: 'vector' does not name a type
   23 | typedef vector<LL> VLL;
      |         ^~~~~~
a.cc:24:9: error: 'pair' does not name a type
   24 | typedef pair<int,int> PII;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: 'ios' has not been declared
   31 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:33:1: error: 'cin' was not declared in this scope
   33 | cin>>x;
      | ^~~
a.cc:36:1: error: 'cout' was not declared in this scope
   36 | cout<<p<<endl;
      | ^~~~
a.cc:36:10: error: 'endl' was not declared in this scope
   36 | cout<<p<<endl;
      |          ^~~~
a.cc:38:18: error: 'cout' was not declared in this scope
   38 | else if(x%11<=6){cout<<p+1<<endl;}
      |                  ^~~~
a.cc:38:29: error: 'endl' was not declared in this scope
   38 | else if(x%11<=6){cout<<p+1<<endl;}
      |                             ^~~~
a.cc:40:1: error: 'cout' was not declared in this scope
   40 | cout<<p+2<<endl;
      | ^~~~
a.cc:40:12: error: 'endl' was not declared in this scope
   40 | cout<<p+2<<endl;
      |            ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#include <cmath>

#define _USE_MATH_DEFINES
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define INF 999999999;
#define atcoder 1000000007;

using namespace std;

int main(){

	int N, a, max = 0, cnt = 0, ans = 0;
	int A[100000] = { 0 };

	cin >> N;
	REP(i, N) {
		cin >> a;
		A[a]++;
		if (max < a)
			max = a;
	}

	REP(i, max) {
		if (A[i] > 1) {
			cnt++;
			ans += A[i] - 1;
		}
	}


	if (ans % 2 == 0) {
		cout << N - ans << endl;
	}
	else
		cout << N - ans - 1 << endl;

	system("pause");
	return 0;
}

int main() {
	long long int x, ans = 0;

	cin >> x;

	if (x <= 6) {
		ans = 1;
	}
	else if (x <= 11) {
		ans = 2;
	}
	else {
		ans = 2 * (x / 11);
		if (x % 11 != 0) {
				ans++;
		}
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:54:5: error: redefinition of 'int main()'
   54 | int main() {
      |     ^~~~
a.cc:23:5: note: 'int main()' previously defined here
   23 | int main(){
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
long long int x,ans;
cin>>x;
if(x>11){
ans=(x/11)*2;
if(x%11<=6 x%11>0)ans++;else ans+=2;
}else{
if(x>6)ans=2;else ans=1;
}
cout<<ans<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ')' before 'x'
    8 | if(x%11<=6 x%11>0)ans++;else ans+=2;
      |   ~       ^~
      |           )
Language: C++

#include<iostream>
#include<cstdio>
using namepace std;
int main(void)
{
    long long x;
    while(cin>>x)
    {
        long long y=x/11;
        long long z=x%11;
        long long ans=2*y-1;
        if(z==0)
        ans+=0;
        else if(ans<7)
        ans+=1;
        else  
        ans+=2;
        cout<<ans<<endl;
    }
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namepace'
    3 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     while(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:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |         cout<<ans<<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:18:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |         cout<<ans<<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<iostream>
using namespace std;
int main()
{
	long long a;
	long long b;
	long long c;
	
	cin >> a;

	b = a / 11;
	c = a % 11;
	
	if (c = 0)
		cout << 2 * b;

	if ( c > 0 && c < 7)
		cout << 2 * b + 1;
	
	if ( C > 6 && c < 11)
		cout << 2 * b + 2;

	cin >> a;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: 'C' was not declared in this scope
   20 |         if ( C > 6 && c < 11)
      |              ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	long long x, ans, result, remain;
	cin >> x;
	cout << x << endl;
	if(x <= 11){
		if(x <= 6){
			ans = 1;
		}else{
			ans = 2;
		}
	}else{
		result = x/11;
		remain = x % 11;
		if(remain === 0){
			ans = result * 2;
		}else{
			ans =  result * 2 + 1;
		}
	}
	
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: expected primary-expression before '=' token
   17 |                 if(remain === 0){
      |                             ^
Language: C

int main(void){long long int a,b,ans;scanf("%lld",&a);
ans=(a-5%11)a*2/11:(a-5)*2/11+1;
printf("%lld\n",ans);return 0;}

Compiler output:
main.c: In function 'main':
main.c:1:38: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(void){long long int a,b,ans;scanf("%lld",&a);
      |                                      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){long long int a,b,ans;scanf("%lld",&a);
main.c:1:38: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(void){long long int a,b,ans;scanf("%lld",&a);
      |                                      ^~~~~
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:13: error: expected ';' before 'a'
    2 | ans=(a-5%11)a*2/11:(a-5)*2/11+1;
      |             ^
      |             ;
main.c:3:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 | printf("%lld\n",ans);return 0;}
      | ^~~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cmath>

#define rep(i, n) for (i = 0; i < n; ++i)
#define REP(i, m, n) for (i = m, i < n; ++i)

#define INF 1000 * 1000

using namespace std;

int main() {

  unsigned long long n;
  cin >> n;

  unsigned long long res;

  unsigned long double tmp = n / 11.0 * 2.0;

  res = (unsigned long long)ceil(tmp);

  if (n == 6)
    printf("%d\n", 1);
  else
    printf("%lld\n", res);


  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'unsigned' specified with 'long double'
   23 |   unsigned long double tmp = n / 11.0 * 2.0;
      |   ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	unsigned long long  x, ans, result;
	cin >> x;
	if(x <= 11){
		if(x <= 6){
			ans = 1;
		}else{
			ans = 2;
		}
	}else{
		result = x/11;
		remain = x % 11;
		if(remain == 0){
			ans = result * 2;
		}else{
			ans =  result * 2 + 1;
		}
	}
	
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'remain' was not declared in this scope; did you mean 'main'?
   15 |                 remain = x % 11;
      |                 ^~~~~~
      |                 main
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
long x=sc.nextLong();
long ans=(long)(x/11);
if(x-11*ans<6)ans++;
ans++;
System.out.println(ans);
}

Compiler output:
Main.java:10: error: reached end of file while parsing
}
 ^
1 error
Language: C

#include<stdio.h>
int main()
{
  int x;
  int counter=0;
  int check=0;
scanf("%d",&x);
  while(x>0)
  {
    if(check%2==0)
    x-=6;
    else
    x-=5;
    counter++;
    check++;
  }
  printf("%d",check);
  return 0;
}
    x-=6;

Compiler output:
main.c:20:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-=' token
   20 |     x-=6;
      |      ^~
Language: C++

#include <cstdio>

using namespace std;

int main()
{
    ll x;

    scanf("%lld", &x);

    ll mod = 11;
    ll rem = x % mod;
    ll div = x / mod;

    div *= 2;

    if (rem <= 6) div += 1;
    else div += 2;

    printf("%lld\n", div);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
    7 |     ll x;
      |     ^~
a.cc:9:20: error: 'x' was not declared in this scope
    9 |     scanf("%lld", &x);
      |                    ^
a.cc:11:7: error: expected ';' before 'mod'
   11 |     ll mod = 11;
      |       ^~~~
      |       ;
a.cc:12:7: error: expected ';' before 'rem'
   12 |     ll rem = x % mod;
      |       ^~~~
      |       ;
a.cc:13:7: error: expected ';' before 'div'
   13 |     ll div = x / mod;
      |       ^~~~
      |       ;
a.cc:15:5: error: 'div' was not declared in this scope
   15 |     div *= 2;
      |     ^~~
a.cc:17:9: error: 'rem' was not declared in this scope
   17 |     if (rem <= 6) div += 1;
      |         ^~~
Language: C++

#include<stdio.h>
#include<string.h>
using namespace std;
#define ll __int64
int main()
{
    ll a;
    while(~scanf("%I64d",&a))
    {
        ll output=a/11*2;
        a%=11;
        if(a>=1&&a<=5)output++;
        if(a>=6&&a<=10)output+=2;
        printf("%I64d\n",output);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    4 | #define ll __int64
      |            ^~~~~~~
a.cc:7:5: note: in expansion of macro 'll'
    7 |     ll a;
      |     ^~
a.cc:8:27: error: 'a' was not declared in this scope
    8 |     while(~scanf("%I64d",&a))
      |                           ^
a.cc:10:12: error: expected ';' before 'output'
   10 |         ll output=a/11*2;
      |            ^~~~~~
a.cc:12:23: error: 'output' was not declared in this scope
   12 |         if(a>=1&&a<=5)output++;
      |                       ^~~~~~
a.cc:13:24: error: 'output' was not declared in this scope
   13 |         if(a>=6&&a<=10)output+=2;
      |                        ^~~~~~
a.cc:14:26: error: 'output' was not declared in this scope
   14 |         printf("%I64d\n",output);
      |                          ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	long x;
	cin >> x;
	long ans = 0;
	ans += x / 11;
	ans *= 2;
	if (x % 11 = 0);
	else if (x % 11 >= 7) ans += 2;
	else ans++;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: lvalue required as left operand of assignment
   10 |         if (x % 11 = 0);
      |             ~~^~~~
Language: Java

import java.util.Arrays;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		sc.close();

		Arrays.sort(a);

		int index = 0;

		boolean isRemaining = false;

		while(index < n) {

			if (isRemaining) {
				a[index + 1] = a[index];
				a[index] = 0;
				isRemaining = false;
				index++;
				continue;
			}

			if(index < n - 1 && a[index + 1] == a[index]) {
				a[index] = 0;
				isRemaining = true;
			}

			index++;

		}

		// System.out.println(Arrays.toString(a));

		int count = 0;
		for (int i = 0; i < n; i++) {
			if(a[i] != 0) {
				count++;
			}
		}

		System.out.println(count);
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors