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


#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

template<long long mod>
class modint{
private:
  long long num;
  long long extgcd(long long a, long long b, long long&x, long long&y)const {
    long long d = a;
    if(b != 0){d = extgcd(b, a%b, y, x);  y -= (a/b) * x;}
    else{x = 1; y = 0;}
    return d;
  }
  long long modinverse()const{
    long long x, y;
    extgcd(num, mod, x, y);
    return (mod + x%mod)%mod;
  }
public:
  modint():num(0){}
  modint(const long long x):num((x < 0?(x+mod):x)%mod ){}
  friend modint operator+(const modint&a, const modint&b)
  {    return modint(a.num + b.num);  }
  friend modint operator-(const modint&a, const modint&b)
  {    return modint(a.num - b.num);  }
  friend modint operator*(const modint&a, const modint&b)
  {    return modint(a.num * b.num);  }
  friend modint operator/(const modint&a, const modint&b)
  {    return modint(a*b.modinverse());  }
  modint& operator+=(const modint&b)
  {    return (*this) = (*this) + b;  }
  modint& operator-=(const modint&b)
  {    return (*this) = (*this) - b;  }
  modint& operator*=(const modint&b)
  {    return (*this) = (*this) * b;  }
  modint& operator/=(const modint&b)
  {    return (*this) = (*this) / b;  }
  modint& operator++()
  {    (*this)+=1; return (*this);  }
  modint& operator--()
  {    (*this)-=1; return (*this);  }
  modint operator++(int){
    modint tmp(*this);
    ++(*this);
    return tmp;
  }
  modint operator--(int){
    modint tmp(*this);
    --(*this);
    return tmp;
  }    
  modint pow(unsigned long long i){
    if(i == 0) return 1;
    if(i & 1){
      return (*this) * (this->pow(i-1));
    }
    modint<mod>hpow = (this->pow(i>>1));
    return hpow * hpow;
  }
  friend ostream& operator<<(ostream&os, const modint&a){
    os << a.num;
    return os;
  }
  friend istream& operator>>(istream&is, modint&a){
    long long x; is >> x;
    a = x;
    return is;
  }
};

using mint =  modint<1000000007>;

int main(){
  ll x; cin >> x;
  ans = 1;
  x -= 1;
  ans += (x / 11)*2;
  x %= 11;
  if(x > 0){
    ans++;
    x -= 5;    
  }
  if(x > 0){
    ans++;;
  }
  cout << ans << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:111:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
  111 |   ans = 1;
      |   ^~~
      |   abs
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: expected ';' before 'return'
   17 |     cout << ans << endl
      |                        ^
      |                        ;
   18 |     return 0;
      |     ~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'n' was not declared in this scope
   15 |         if(n%11 == 0) ans--;
      |            ^
a.cc:17:24: error: expected ';' before 'return'
   17 |     cout << ans << endl
      |                        ^
      |                        ;
   18 |     return 0;
      |     ~~~~~~
Language: C++

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

#define ll long long

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: continue statement not within a loop
   12 |     continue;
      |     ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define ALL(a)    a.begin(), a.end() 
#define rep(i, K, N)  for(int i = K; i < N; i++)
#define ll long long int
using namespace std;
int main() {
ll K;cin >> x;

if(x%11 <= 6)cout << (x/11)*2 + 1;
else cout << (x/11)*2 + 2;
}

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

#include <stdio.h>
int main(){
  long x, z, y=0;
  
  scanf("%ld",&x);
  z=x;
 
  result+=(z/11)*2;
  z=z%11;
  
  if(7<=z){
    result+=2;
  } else if(1<=z && z<7) {
    result+=1;
  }
  
  printf("%ld",y);
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'result' undeclared (first use in this function)
    8 |   result+=(z/11)*2;
      |   ^~~~~~
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
  long x, z, y=0;
  
  scanf("%ld",&x);
  tmp=x;
 
  result+=(z/11)*2;
  z=z%11;
  
  if(7<=z){
    result+=2;
  } else if(1<=z && z<7) {
    result+=1;
  }
  
  printf("%ld",y);
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'tmp' undeclared (first use in this function)
    6 |   tmp=x;
      |   ^~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:3: error: 'result' undeclared (first use in this function)
    8 |   result+=(z/11)*2;
      |   ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin>>x;
  int ans=0;sum=0;
  while(true){
    sum+=6;
    ans++;
    if(sum>=x){
      break;
    }
    sum+=5;
    ans++;
    if(sum>=x){
      break;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'sum' was not declared in this scope
    6 |   int ans=0;sum=0;
      |             ^~~
Language: Java

import java.util.*;

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


Compiler output:
Main.java:9: error: 'else' without 'if'
        else if(x % 11 <= 6) ans++;
        ^
1 error
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i < n; ++i)
using namespace std;
const int INF = 2147483647;
using ll = long long;

int main() {
    ll x;
    cin >> x;
    ll a=0;
    ll ans;
    long double b =11;
    if(x %b>0 && x%b<=6)  a=1;
    if(x % b == 0)
        ans = (x/b)*2-a;
    else
        ans = (x/b)*2+2-a;

    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   13 |     if(x %b>0 && x%b<=6)  a=1;
      |        ~ ^~
      |        |  |
      |        |  long double
      |        ll {aka long long int}
a.cc:13:19: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   13 |     if(x %b>0 && x%b<=6)  a=1;
      |                  ~^~
      |                  | |
      |                  | long double
      |                  ll {aka long long int}
a.cc:14:10: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   14 |     if(x % b == 0)
      |        ~ ^ ~
      |        |   |
      |        |   long double
      |        ll {aka long long int}
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i < n; ++i)
using namespace std;
const int INF = 2147483647;
using ll = long long;

int main() {
    ll x;
    cin >> x;
    ll a=0;
    ll ans;
    long double b =11;
    if(x %b>0 && x%b<6)  a=1;
    if(x % b == 0)
        ans = (x/b)*2-a;
    else
        ans = (x/b+1)*2-a;

    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   13 |     if(x %b>0 && x%b<6)  a=1;
      |        ~ ^~
      |        |  |
      |        |  long double
      |        ll {aka long long int}
a.cc:13:19: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   13 |     if(x %b>0 && x%b<6)  a=1;
      |                  ~^~
      |                  | |
      |                  | long double
      |                  ll {aka long long int}
a.cc:14:10: error: invalid operands of types 'll' {aka 'long long int'} and 'long double' to binary 'operator%'
   14 |     if(x % b == 0)
      |        ~ ^ ~
      |        |   |
      |        |   long double
      |        ll {aka long long int}
Language: C++

#include<bits/stdc++.h>
long long n,ans=0,x;
int main(){
  return std::cin>>x,n=std::ceil(n/11.0),ans=std::ceil(n/11.0)*2,std::cout<<ans-*(bool)(x*11-n>=5)<<std::endl,0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:81: error: invalid type argument of unary '*' (have 'bool')
    4 |   return std::cin>>x,n=std::ceil(n/11.0),ans=std::ceil(n/11.0)*2,std::cout<<ans-*(bool)(x*11-n>=5)<<std::endl,0;
      |                                                                                 ^~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
int main(int n,int ans=0,int x){
  return std::cin>>x,n=std::ceil(n/11.0),ans=std::ceil(n/11.0)*2,std::cout<<ans-(x*11-n>=5)<<std::endl,0;
}

Compiler output:
a.cc:2:5: warning: second argument of 'int main(int, int, int)' should be 'char **' [-Wmain]
    2 | int main(int n,int ans=0,int x){
      |     ^~~~
a.cc:2:5: warning: third argument of 'int main(int, int, int)' should probably be 'char **' [-Wmain]
a.cc:2:30: error: default argument missing for parameter 3 of 'int main(int, int, int)'
    2 | int main(int n,int ans=0,int x){
      |                          ~~~~^
a.cc:2:20: note: ...following parameter 2 which has a default argument
    2 | int main(int n,int ans=0,int x){
      |                ~~~~^~~~~
Language: C++

#include<bits/stdc++.h>
int main(long long n,long long ans=0,long long x){
  return std::cin>>x,n=std::ceil(n/11.0),ans=std::ceil(n/11.0)*2,std::cout<<ans-(x*11-n>=5)<<std::endl,0;
}

Compiler output:
a.cc:2:5: warning: first argument of 'int main(long long int, long long int, long long int)' should be 'int' [-Wmain]
    2 | int main(long long n,long long ans=0,long long x){
      |     ^~~~
a.cc:2:5: warning: second argument of 'int main(long long int, long long int, long long int)' should be 'char **' [-Wmain]
a.cc:2:5: warning: third argument of 'int main(long long int, long long int, long long int)' should probably be 'char **' [-Wmain]
a.cc:2:48: error: default argument missing for parameter 3 of 'int main(long long int, long long int, long long int)'
    2 | int main(long long n,long long ans=0,long long x){
      |                                      ~~~~~~~~~~^
a.cc:2:32: note: ...following parameter 2 which has a default argument
    2 | int main(long long n,long long ans=0,long long x){
      |                      ~~~~~~~~~~^~~~~
Language: C++

#include<bit/stdc++.h>
using namespace std;
int main()
{
    long long a;
    while(cin>>a)
    {
        long long mod=11,s=a/11*2;
        a%=1;
        if(a>=1&&a<=6)s++;
        if(a>=7&&a<=10)s+=2;
        cout<<s<<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<bit/stdc++.h>
using namespace std;
int main()
{
    long long a;
    while(cin>>a)
    {
        long long mod=11,s=a/11*2;
        a%=1;
        if(a>=1&&a<=6)s++;
        if(a>=7&&a<=10)s+=2;
        cout<<s;
    }
}

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>
#define PI 3.141592653
#define rep(i,a,n) for(int i=a;i<(int)n;++i)
#define SZ(x) ((int)(x).size())	//size() unsigned -> int
#define descSort(a) sort(a.begin(),a.end(),std::greater<int>())
using namespace std;
typedef long long ll;
const ll INF = 1e9 + 7;
ll gcd(ll x,ll y){
    if(x%y==0)return y;
    return gcd(y,x%y);
}
int main(void){
    ll n;
    cin>>n;
    ll ans=0,tmp=0;
    bool can=false;
    ll num=n/11;
    ans=2*num+2;
    ll tmp=11*(ans-1);
    if(tmp - 6 >= n || tmp - 5 >= n)cout<<ans-1<<endl;
    else cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: redeclaration of 'll tmp'
   20 |     ll tmp=11*(ans-1);
      |        ^~~
a.cc:16:14: note: 'll tmp' previously declared here
   16 |     ll ans=0,tmp=0;
      |              ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <numeric>
#include <set>
#include <cstdlib>
#include <queue>
#include <map>

using namespace std;

typedef long long llint;
typedef long double ld;
#define inf 1e18
#define mod 1000000007
priority_queue<llint,vector<llint>,greater<llint>> que;
//priority_queue<llint> q;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

llint x;

void solve(){
  cin >> x;
  llint ans=x/11*2;
  if(x%11==0)ans+=0
  else if(x%11>6)ans+=2;
  else ans++;
  cout << ans <<  endl;
}

int main(int argc, char *argv[]) {
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:28:20: error: expected ';' before 'else'
   28 |   if(x%11==0)ans+=0
      |                    ^
      |                    ;
   29 |   else if(x%11>6)ans+=2;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)

const int mod = 1000000007;

int main(){
    ll x;
    cin >> x;
    ll a = x / 11;
    ll b = x % 11;
    if(b <= 6){b = 1;}else{b = 2};
    cout << a*2+b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:33: error: expected ';' before '}' token
   24 |     if(b <= 6){b = 1;}else{b = 2};
      |                                 ^
      |                                 ;
Language: C++

//

#include <bits/stdc++.h>

using namespace std;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'a' was not declared in this scope
   11 |         if(ans*11 == x){a
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ll　n;cin>>n;cout<<(ll)2*(n/11)+1+(n%11)/6;
}

Compiler output:
a.cc:5:1: error: extended character 　 is not valid in an identifier
    5 | ll　n;cin>>n;cout<<(ll)2*(n/11)+1+(n%11)/6;
      | ^
a.cc: In function 'int main()':
a.cc:5:1: error: 'll\U00003000n' was not declared in this scope
    5 | ll　n;cin>>n;cout<<(ll)2*(n/11)+1+(n%11)/6;
      | ^~~~~
a.cc:5:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 | ll　n;cin>>n;cout<<(ll)2*(n/11)+1+(n%11)/6;
      |            ^
      |            yn
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#include <iomanip>
#include <numeric>
#include <unordered_map>
#include <sstream>   
#include<limits.h>
#include<list>
#include <array>
#include <complex>
using namespace std;
#define i64  long long
#define int  long long
 
#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807
#define INF I64_MAX/2
#define MOD 1000000007
#define MEM_SIZE 10000

// int DP[MEM_SIZE][MEM_SIZE] = {0};
// int GMEM[MEM_SIZE][MEM_SIZE] = {0};
template<typename T> void DEBUG(T e){std::cout << e << std::endl;}
template<class T> void DEBUG(string str, T e){std::cout <<str << ">>" << e << std::endl;}
template<typename T> void DEBUG(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void DEBUG(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ DEBUG(v); } }
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template< typename T1, typename T2 > inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template< typename T1, typename T2 > inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }




void update(vector<int> & Segtree, int k, int a,int N)
{
  k += N -1;
  Segtree[k] = a;
  while(k > 0)
  {
    k = (k-1)/2;
    Segtree[k] = min(Segtree[2*k+1],Segtree[2*k + 2]);
  }
}

int query(vector<int> & Segtree,int a, int b, int k, int l,int r)
{
  // DEBUG(k);
  if(r <= a || b <= l) return 2147483647;
  if(a <= l && r <= b) return Segtree[k];
  else
  {
    int vl = query(Segtree,a,b,k*2+1,l,(r+l)/2);
    int vr = query(Segtree,a,b,k*2+2,(l+r)/2,r);
    return min (vr,vl);
  }

  

}

void solve(void)
{
  int X;
  cin>>X;
  if( X - 1 == 0)
  {
    cout<0<<endl;
    return;
  }
  // X--;
  int Y = X/11;
  X = X%11;

  if(X < 6)
  {
    cout<<2*Y  + 1 <<endl;
  }
  else
  {
    cout<<2*Y + 2 <<endl;
  }
  
  return; 
}


int32_t main(int32_t argc, const char *argv[])
{
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  std::cout << std::fixed;
  std::cout << std::setprecision(9);
  solve();

 
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:78:11: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   78 |     cout<0<<endl;
      |          ~^~~~~~
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;

int main () {
    long long x;
    ans, k;
    cin >> x;

    ans += (x/11)*2;
    k = x%11;

    if (0<k && k<=6) {
        ans += 1;
    }
    else if (6<k){
        ans += 2;
    }


    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |     ans, k;
      |     ^~~
      |     abs
a.cc:7:10: error: 'k' was not declared in this scope
    7 |     ans, k;
      |          ^
Language: C++

#include<iostream>
using namespace std;

int main () {
    long long x;
    ans, k;
    cin >> x;

    ans += (x/11)*2;
    k = x%11;

    if (k>0) {
        if (k<=6){
        ans += 1;
        }
        else {
        ans += 2;
        }
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |     ans, k;
      |     ^~~
      |     abs
a.cc:6:10: error: 'k' was not declared in this scope
    6 |     ans, k;
      |          ^
Language: C++

#include<iostream>
using namespace std;

int main () {
    long long x;
    ans, k;
    cin >> x;

    ans += (x/11)*2;
    k = x%11;

    if (k!=0) {
        if (0<k && k<=6){
        ans += 1;
        }
        else {
        ans += 2;
        }
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |     ans, k;
      |     ^~~
      |     abs
a.cc:6:10: error: 'k' was not declared in this scope
    6 |     ans, k;
      |          ^
Language: C++

#include<iostream>
using namespace std;

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

    ans += (x/11)*2;
    k = x%11;

    if (k!=0) {
        if (0<k && k<=6){
        ans += 1;
        }
        esle {
        ans += 2;
        }
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |     ans=0,k=0;
      |     ^~~
      |     abs
a.cc:6:11: error: 'k' was not declared in this scope
    6 |     ans=0,k=0;
      |           ^
a.cc:16:9: error: 'esle' was not declared in this scope
   16 |         esle {
      |         ^~~~
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){
    cout<<2*ans<<endl;
  }else(x%11<=6){
    cout<<2*ans+1<<endl;
  }else{
    cout<<2*ans+2<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '{' token
   11 |   }else(x%11<=6){
      |                 ^
      |                 ;
a.cc:13:4: error: 'else' without a previous 'if'
   13 |   }else{
      |    ^~~~
Language: C++

//#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"

#define rep(i,n) for(ll (i)=0;(i)<(ll)(n);(i)++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007LL
#define INF (1LL<<60LL)
#define int long long
typedef long long ll;

using namespace std;



signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll x; cin >> x;
	ll ans = 0;
	ans = int(x / 11) * 2;
	x %= 11;
	if (0 < x) ans++;
	if (6 < x)ans++;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before 'long'
    8 | #define int long long
      |             ^~~~
a.cc:20:15: note: in expansion of macro 'int'
   20 |         ans = int(x / 11) * 2;
      |               ^~~
Language: C++

import sys
x = int(input())
a = (x // 11) * 2
if x % 11 == 0 :
    print(a)
elif x%11 <= 6 :
    print(a+1)
else :
    print(a+2)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

<?php
$n = fgets(STDIN);
$ans = floor($n / 11) * 2;
$t = $n % 11;
if($t > 6){
    $ans+=2;
}
else if($t > 0){
    $ans++;
}
echo $ans;

?>

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:3:1: error: '$ans' does not name a type
    3 | $ans = floor($n / 11) * 2;
      | ^~~~
a.cc:4:1: error: '$t' does not name a type
    4 | $t = $n % 11;
      | ^~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if($t > 6){
      | ^~
a.cc:8:1: error: expected unqualified-id before 'else'
    8 | else if($t > 0){
      | ^~~~
a.cc:11:1: error: 'echo' does not name a type
   11 | echo $ans;
      | ^~~~
a.cc:13:1: error: expected unqualified-id before '?' token
   13 | ?>
      | ^
Language: C++

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

    LL ans = x/11*2;

    if((x-x/11*11) <= 6){
        ans += 1;
    }else{
        ans += 2;
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'LL' was not declared in this scope
    2 |     LL x;
      |     ^~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> x;
      |     ^~~
a.cc:3:12: error: 'x' was not declared in this scope
    3 |     cin >> x;
      |            ^
a.cc:5:7: error: expected ';' before 'ans'
    5 |     LL ans = x/11*2;
      |       ^~~~
      |       ;
a.cc:8:9: error: 'ans' was not declared in this scope
    8 |         ans += 1;
      |         ^~~
a.cc:10:9: error: 'ans' was not declared in this scope
   10 |         ans += 2;
      |         ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << ans << endl;
      |     ^~~~
a.cc:13:13: error: 'ans' was not declared in this scope
   13 |     cout << ans << endl;
      |             ^~~
a.cc:13:20: error: 'endl' was not declared in this scope
   13 |     cout << ans << endl;
      |                    ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'x' was not declared in this scope
    8 |   count=x%11;
      |         ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  unsigned long long int x;
  cin >> x;
  
  //6→5,5→6
  unsigned long long int a, b;
  a = (x / 11) * 2;
  if(x % 11 <= 5) a += 1
  else a += 2;
  
  b = (x / 11) * 2;
  if(x % 11 <= 6) b += 1;
  else b += 2;
  cout << min(a, b);
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected ';' before 'else'
   12 |   if(x % 11 <= 5) a += 1
      |                         ^
      |                         ;
   13 |   else a += 2;
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
int main(){long long N;cin>>N;long long a=N/11*2,b=N%11;if(1<=b and b<=6)a++;else a+=2;
std::cout<<a<<std::endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:24: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){long long N;cin>>N;long long a=N/11*2,b=N%11;if(1<=b and b<=6)a++;else a+=2;
      |                        ^~~
      |                        std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <cstring>
#include <math.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: overloaded function with no contextual type information
   26 |             remainder = x / 11
      |                             ^~
a.cc:28:17: error: 'rest' was not declared in this scope
   28 |             if (rest > 6)
      |                 ^~~~
a.cc:30:47: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator*'
   30 |                 cout << (long long)(remainder * 2) + 2);
      |                                     ~~~~~~~~~~^~~
a.cc:34:46: error: overloaded function with no contextual type information
   34 |                 cout << (long long)(remainder) + 1);
      |                                              ^
Language: C++

#include <bits/stdc++.h> 

using namespace std;

#define YES cout << "YES" << endl;
#define NO  cout << "NO"  << endl;
#define Yes cout << "Yes" << endl;
#define No  cout << "No"  << endl;
 
#define INF INT_MAX
#define MOD 1000000007
#define PI  acos(-1)

using ll  = long long;
using ull = unsigned long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rrep(i, n) for (ll i = (n)-1; i >= 0; i--)

int main(int argc, char *argv[])
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll x;
    cin >> x;

    ll ans = (x/11)*2;
    if (X%11 != 0) {
        ans++;
        if (X%11 > 6) {
            ans++;
        }
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:31:9: error: 'X' was not declared in this scope
   31 |     if (X%11 != 0) {
      |         ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <numeric>
#include <cmath>
#include <cassert>

using namespace std;

typedef long long int ll;
typedef pair<int,int> P;

#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int main()
{
	ll x;
	cin>>x;
	ll res = x%11;
	if(res>0) res = (res<=6?1:2);
	cout<<(x/11)*2'+res<<endl;
	return 0;
}

Compiler output:
a.cc:34:23: warning: missing terminating ' character
   34 |         cout<<(x/11)*2'+res<<endl;
      |                       ^
a.cc:34:23: error: missing terminating ' character
   34 |         cout<<(x/11)*2'+res<<endl;
      |                       ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:34:23: error: expected ';' before 'return'
   34 |         cout<<(x/11)*2'+res<<endl;
      |                       ^
      |                       ;
   35 |         return 0;
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define FORL(i,x) for(int i=head[x];i;i=nxt[i])
#define ALL(a)  (a).begin(),(a).end()
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define PB push_back
#define MP make_pair
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



int main() {
  ll N;
  scanf("%lld", &N);
  ll ans = 0;
  
  ll base = N/11;
  N = N%11;
  if(N<=6 %% N!=0) ++ans;
  else ans += 2;

  cout << ans + base*2 << endl;



}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: expected primary-expression before '%' token
   26 |   if(N<=6 %% N!=0) ++ans;
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  long long x , ans = 0 , amari = 0 ;
  cin >> x;
  
  ans += 2 * ( x / 11 );
    
  amari = x % 11
    
  if  ( 0 < amari && amari <= 5)
    ans += 1
  if (6 <= amari)
    ans += 2
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before 'if'
   11 |   amari = x % 11
      |                 ^
      |                 ;
   12 | 
   13 |   if  ( 0 < amari && amari <= 5)
      |   ~~
Language: C++

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

#define REP(i, n) for(int i = 0;i < n;i++)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define ll long long
const ll mod = 1e9+7;

void sieve(size_t max, vector<bool> &isPrime){
    isPrime[0] = false; 
    isPrime[1] = false; 
    for (size_t i = 2; i*i <= max; ++i) 
        if(isPrime[i])
            for(size_t j=2; i*j <= max; ++j) 
                isPrime[i*j] = false; 
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll x;
	cin >> x;
	ll ans;
	if (x=<6){ cout << 1 << endl; return 0; }
	ans = 2*(x/11+1);
	if (x%11 <=6){ ans--; }
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: expected primary-expression before '<' token
   24 |         if (x=<6){ cout << 1 << endl; return 0; }
      |               ^
Language: Java


import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger x = new BigInteger(sc.next());
		boolean flag = true;
		BigInteger ans;
		int y = x.mod(new BigInteger("11")).intValue();
		if(0 < y && y <= 6) {
			ans = x.divide(new BigInteger("11")).multiply(new BigInteger("2")).add(new BigInteger("1"));
		} else if(6 < y) {
			ans = x.divide(new BigInteger("11")).multiply(new BigInteger("2")).add(new BigInteger("2"));
		}
		System.out.println(ans.toString());

	}

}


Compiler output:
Main.java:18: error: variable ans might not have been initialized
		System.out.println(ans.toString());
		                   ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int64_t x;
  cin>>x;
  int64_t a=(x-(x%11))/11;
  int64_t b=x%11;
  if(b==0){
    cout<< 2*a;
  }a
  else if(b<=6){
    cout<<2*a+1;
  }
  else{
    cout << 2*(a+1);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ';' before 'else'
   11 |   }a
      |     ^
      |     ;
   12 |   else if(b<=6){
      |   ~~~~
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<n;i++)
int main(void){
    ll n;cin>>n;
    else if(n%11>0&&n%11<=6)cout<<n/11*2+1<<endl;
    else cout<<(n+10)/11*2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'else' without a previous 'if'
    7 |     else if(n%11>0&&n%11<=6)cout<<n/11*2+1<<endl;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
long long inf=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};
 
int main(){
  long long x;
  cin>>x;
  long long time;
  int rest;
  time = x/11;
  rest = x%11;
  long long ans;
  if(rest==0){
    ans = time;
  }else if(rest<=6){
    ans = time+1;
  }else{
    ans = time+2
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:84:17: error: expected ';' before '}' token
   84 |     ans = time+2
      |                 ^
      |                 ;
   85 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
typedef long long int ll;
typedef vector<pair<ll,ll> > Q;

int main()
{
  ll x,ans=0;
  cin>>x;

  ans+=(x/11)*2;
  if(x%11>=7) ans+=2;
  else if(x%11>=1) ans++;

  cout<<ans<<endl;
}

Compiler output:
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<pair<ll,ll> > Q;
      |         ^~~~~~
Language: C++

macro_rules! get {
      ($t:ty) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              line.trim().parse::<$t>().unwrap()
          }
      };
      ($($t:ty),*) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              let mut iter = line.split_whitespace();
              (
                  $(iter.next().unwrap().parse::<$t>().unwrap(),)*
              )
          }
      };
      ($t:ty; $n:expr) => {
          (0..$n).map(|_|
              get!($t)
          ).collect::<Vec<_>>()
      };
      ($($t:ty),*; $n:expr) => {
          (0..$n).map(|_|
              get!($($t),*)
          ).collect::<Vec<_>>()
      };
      ($t:ty ;;) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              line.split_whitespace()
                  .map(|t| t.parse::<$t>().unwrap())
                  .collect::<Vec<_>>()
          }
      };
      ($t:ty ;; $n:expr) => {
          (0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()
      };
}

fn main() {
    let x = get!(u64);
    let res_base = x/11 * 2;
    let res_add = match x%11 {
        0 => 0,
        1 ... 5 => 1,
        _ => 2
    };
    println!("{}", res_base + res_add);
}


Compiler output:
a.cc:20:12: error: too many decimal points in number
   20 |           (0..$n).map(|_|
      |            ^~~~~
a.cc:25:12: error: too many decimal points in number
   25 |           (0..$n).map(|_|
      |            ^~~~~
a.cc:39:12: error: too many decimal points in number
   39 |           (0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()
      |            ^~~~~
a.cc:1:1: error: 'macro_rules' does not name a type
    1 | macro_rules! get {
      | ^~~~~~~~~~~
a.cc:43:1: error: 'fn' does not name a type
   43 | fn main() {
      | ^~
Language: C

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
#include<stdio.h>
#include<cstdio>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 1e9;
int main() {
	long long n, ans = 0;
	scanf("lld%", &n);
	ans += (n / 11) * 2;
	n %= 11;
	ans += (n + 5) / 6;
	printf("%lld\n", ans);
	return 0;
}

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

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
#include<stdio.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 1e9;
int main() {
	long long n, ans = 0;
	scanf("lld%", &n);
	ans += (n / 11) * 2;
	n %= 11;
	ans += (n + 5) / 6;
	printf("%lld\n", ans);
	return 0;
}

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

// #include <bits/stdc++.h>
#include <map>
#include <set>
#include <ctime>
#include <cstring>
#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
 
#define mod 1000000007
#define INF 1000000000

#define pb push_back
#define mp make_pair
#define all(x) begin(x), end(x)
#define len(x) ((int)(x).size())
#define contains(a, x) (a.find(x) != end(a))
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define F(i,a,b) for(int i = (int)(a); i < (int)(b); ++i)
#define RF(i,a,b)for(int i = (int)(a); i >= (int)(b); --i)

typedef double dbl;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef pair<int,int> pi;

#define fast() {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);}
#define log(x) cout << (x) << endl;


#define exp(x) dbl((6*x)+(5*x))

int main() {
	fast();

	ll a, x = 1;
	cin >> x;

	double r = (x+5)/11.0;
	if (r == 1)
		a = 1
	else {
		a = ll(r * 2);
		if (a % 11) ++a;
	}

	log(a)

	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:45:22: error: expected ';' before 'else'
   45 |                 a = 1
      |                      ^
      |                      ;
   46 |         else {
      |         ~~~~
Language: C++

/* ---------- STL Libraries ---------- */

// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>

/* ---------- Namespace ---------- */

using namespace std;

/* ---------- Type Abbreviation ---------- */

template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using GPQ = priority_queue<T, vector<T>, greater<T>>;

using ll = long long;

#define fst first
#define snd second
#define mp make_pair
#define mt make_tuple

#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)


/* ---------- conversion ---------- */

#define INT(c) static_cast<int>(c)
#define CHAR(n) static_cast<char>(n)
#define LL(n) static_cast<ll>(n)
#define DOUBLE(n) static_cast<double>(n)

/* ---------- container ---------- */

#define ALL(v) (v).begin(), (v).end()
#define SIZE(v) (LL((v).size()))
#define each(itr,v) for(auto (itr):(v))

#define FIND(v, k) (v).find(k) != (v).end()
#define VFIND(v, k) find(ALL(v), k) != (v).end()

#define gsort(b, e) sort(b, e, greater<decltype(*b)>())

/* ----------- debug ---------- */

template <class T>
ostream& operator<<(ostream& os, vector<T> v) {
	os << "[";
	for (auto vv : v)
		os << vv << ",";
	return os << "]";
}

template <class T>
ostream& operator<<(ostream& os, set<T> v) {
	os << "[";
	for (auto vv : v)
		os << vv << ",";
	return os << "]";
}

template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> p) {
	return os << "(" << p.fst << "," << p.snd << ")";
}

/* ---------- Constants ---------- */

// const ll MOD = 1e9 + 7;
// const int INF = 1 << 25;
// const ll INF = 1LL << 50;
// const double PI = acos(-1);
// const double EPS = 1e-10;
// mt19937 mert(LL(time(0)));

/* ---------- Short Functions ---------- */

template <typename T>
T sq(T a) {
	return a * a;
}

template <typename T>
T gcd(T a, T b) {
	if (a > b) return gcd(b, a);
	return a == 0 ? b : gcd(b % a, a);
}

template <typename T, typename U>
T mypow(T b, U n) {
	if (n == 0) return 1;
	if (n == 1) return b /* % MOD */;
	if (n % 2 == 0) {
		return mypow(b * b /* % MOD */, n / 2);
	}
	else {
		return mypow(b, n - 1) * b /* % MOD */;
	}
}

ll pcnt(ll b) {
	return __builtin_popcountll(b);
}



// const ll dx[4] = {0, -1, 1, 0};
// const ll dy[4] = {-1, 0, 0, 1};
// const ll dx[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
// const ll dy[8] = {-1, -1, -1, 0, 0, 1, 1, 1};

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll N;
	cin >> N;
	if (N % 11 == 0) cout << N / 11 * 2 << endl;
	ll c = N / 11;
	else cout << c * 2 + 1 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:144:9: error: 'else' without a previous 'if'
  144 |         else cout << c * 2 + 1 << endl;
      |         ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: expected '(' before '{' token
    9 |     if{
      |       ^
      |       (
a.cc:11:6: error: 'else' without a previous 'if'
   11 |     }else if{
      |      ^~~~
a.cc:11:13: error: expected '(' before '{' token
   11 |     }else if{
      |             ^
      |             (
a.cc:13:6: error: 'else' without a previous 'if'
   13 |     }else {
      |      ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected ';' before '}' token
   22 |         else cout<<sum+2
      |                         ^
      |                         ;
   23 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}

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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected initializer before '+=' token
   18 |   ll ans += (x / 11) * 2;
      |          ^~
Language: C++

#include<string>
#include<cstdio>
#include<cstdlib>
#define MAX 1000000007

int main() {

	long long int x, y;
	long long int count;
	long long int n;

	scanf("%lld", &x);
	n = x / 11;

	y = 11 * n;
	if (y == x) {
		count = 2 * n;
	}
	else if (y > x && y + 6 <= x) {
		count = 2 * n + 1;
	}
	else if (y + 6 < x && x < = y + 10){
		count = 2 * (n + 1);
	}

	printf("%lld", count);


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:35: error: expected primary-expression before '=' token
   22 |         else if (y + 6 < x && x < = y + 10){
      |                                   ^
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main(void){
    int x, n;
  	scanf("%d", &x);
  	n = 0;
  	while (x > 0) {
      n = n + 2;
      x = x - 11;
      }
    }
  printf("%d", n);
  return 0;
}



Compiler output:
a.cc:13:9: error: expected constructor, destructor, or type conversion before '(' token
   13 |   printf("%d", n);
      |         ^
a.cc:14:3: error: expected unqualified-id before 'return'
   14 |   return 0;
      |   ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int64_t x;
  cin >> x;

  if (x <= 7) {
    cout << 2 << "\n";
    return 0;
  }

  uint64_t elevens = x / 11;
  uint64_t mod = x % 11;
  if (mod == 0) {
    cout << (elevens * 2) << << "\n";
  } else if (mod <= 6) {
    cout << (elevens * 2 + 1) << "\n";
  } else {
    cout << (elevens * 2 + 2) << "\n";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: expected primary-expression before '<<' token
   19 |     cout << (elevens * 2) << << "\n";
      |                              ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int64_t x;
  cin >> x;

  if (x <= 7) {
    cout << 2 << "\n";
    return 0;
  }

  uint64_t elevens = x / 11;
  uint64_t mod = x % 11;
  if (mod == 0) {
    cout << (elevens * 2) << << "\n";
  } if (mod <= 6) {
    cout << (elevens * 2 + 1) << "\n";
  } else {
    cout << (elevens * 2 + 2) << "\n";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: expected primary-expression before '<<' token
   19 |     cout << (elevens * 2) << << "\n";
      |                              ^~