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

#include<iostream>
#include <boost/multiprecision/cpp_int.hpp> 
using namespace boost::multiprecision; 
using namespace std; 
cpp_int getSum(int n) 
{  
   pp_int sum = 0; 
   while (n != 0) 
   { 
       sum = sum + n % 10; 
       n = n/10; 
   } 
   return sum; 
} 
int main()
{
  int n;
  cin>>n;
 
  if(getsum(n)%9==0)
     cout<<"Yes";
  else
    cout<<"No";
}

Compiler output:
a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++


#include <bits/stdc++.h>
#include <iterator>
#include <algorithm>
#include <queue>
#include <set>
#include <bitset>
#include <vector>
#include <map>



#define IOS                    ios::sync_with_stdio();cin.tie(0);
#define tc()                int tc;scanf("%d",&tc);while(tc--)
#define endl                "\n"
#define FLOAT_COM(a,b)      if(abs(a-b)==1e-9)
#define LOOP(a,b)           for(i=a;i<b;i++)
#define VI                  vector<int>
#define VLL                 vector<long long>
#define PB                  push_back
#define MP                  make_pair



using namespace std;

//int i,j,k,l,temp;

void shomoy(){
    #ifndef ONLINE_JUDGE
        cerr<<"\nTime  :"<<1.0*clock()/CLOCKS_PER_SEC<<"  s\n";
    #endif

}

bool isprime(int n){
    int f;
    for(f=2;f*f<=n;f++){
        if(n%f==0)
            return false;
    }
    return true;
}


                      /*Driver Code Startes Here*/
int main(){IOS
    int i,count=0;
    char line[100000];
    cin>>line;
    n = strlen(line);
    for(i=0;i<n;i++){
        count += (line[i] - '0');
    }
    if(count%9){
        cout<<"No"<<endl;
    }
    else{
        cout<<"Yes"<<endl;
    }
    


//shomoy();
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:5: error: 'n' was not declared in this scope
   51 |     n = strlen(line);
      |     ^
Language: C++

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

 int N;
 cin >> N;
 int L = N.size();

 int x;
 for(i=0; i < L; i++){
   x += N.at(i);
 }
 
 if(x%9==0){
   cout << "Yes" << endl;
 }
 else{
   cout << "No" << endl;
 }
}
   

Compiler output:
a.cc:5:2: error: 'cin' does not name a type
    5 |  cin >> N;
      |  ^~~
a.cc:6:12: error: request for member 'size' in 'N', which is of non-class type 'int'
    6 |  int L = N.size();
      |            ^~~~
a.cc:9:2: error: expected unqualified-id before 'for'
    9 |  for(i=0; i < L; i++){
      |  ^~~
a.cc:9:11: error: 'i' does not name a type
    9 |  for(i=0; i < L; i++){
      |           ^
a.cc:9:18: error: 'i' does not name a type
    9 |  for(i=0; i < L; i++){
      |                  ^
a.cc:13:2: error: expected unqualified-id before 'if'
   13 |  if(x%9==0){
      |  ^~
a.cc:16:2: error: expected unqualified-id before 'else'
   16 |  else{
      |  ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
  string n;
  int ns, x;
  cin >> n;
  for (int i=0; i < n.size();i++) {
    x += n[i] - '0';
  }
  if (x % 9 == 0) {
    cout << Yes << endl;
  } else {
    cout << No << endl;
  }
}


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

#include<bits/stdc++.h>
#define ll long long
 
using namespace std;
 
int main()
{
      string s;
      cin>>s;
      ll i,sum=0;
      for(i=0;i<s.size();i++)
      {
              ll x = s[i]-48;
              sum+=x;
      }
      if(sum%9==0)
       {
               yes;
       }       
       else
       {
              no;
       }
  
  
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'yes' was not declared in this scope
   18 |                yes;
      |                ^~~
a.cc:22:15: error: 'no' was not declared in this scope
   22 |               no;
      |               ^~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define mp make_pair
typedef long long int ll;
typedef unsigned long long int ull;
#define fi first
#define se second
#define pb push_back
ll p=pow(10,9)+7;
int q=998244353;
typedef long double ld;
const double PI =  3.141592653589793238;
 
ll power(ll x, ll y, ll pp)
{
    ll res = 1;
    x = x % pp;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % pp;
        y = y>>1;
        x = (x*x) % pp;
    }
    return res;
}
 
ll modInverse(ll n, ll pp)
{
    return power(n, pp-2, pp);
}
ll factorial(ll n) 
{ 
    // single line to find factorial 
    
ll ans = 1;
for (int i=1;i<=n;i++)
{
    ans = ans*i;
}
return ans;
} 
bool isPrime(int n) 
{ 
    // Corner case 
    if (n <= 1)  return false; 
  
    // Check from 2 to n-1 
    for (int i=2; i<n; i++) 
        if (n%i == 0) 
            return false; 
  
    return true; 
} 
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
   string s;
  cin>>s;
  ll sum=0;
  for(int i=0;i<s.length();i++)
  {
    int x=s[i]-'0';
    sum=sum+x;
  }
    if(x%9 ==0)
      cout<<"Yes";
  else
    cout<<"No";
    return 0;
}







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

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int sum=0;
  for(int i=0;i<s.size();i++)
    sum=sum+s[i]-'0';
  if(sum/9==0)
    cout<<Yes;
  else
    cout<<No;

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'Yes' was not declared in this scope
   12 |     cout<<Yes;
      |           ^~~
a.cc:14:11: error: 'No' was not declared in this scope
   14 |     cout<<No;
      |           ^~
a.cc:14:14: error: expected '}' at end of input
   14 |     cout<<No;
      |              ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <conio.h>
#include <iostream>

using namespace std;

int main()
{
    char c;
    int holder{0};
    while(c!=13)
    {
        switch(c=getch()){
    case '0':
        break;
    case '1':
        holder+=1;
        break;
    case '2':
        holder+=2;
        break;
    case '3':
        holder+=3;
        break;
    case '4':
        holder+=4;
        break;
    case '5':
        holder+=5;
        break;
    case '6':
        holder+=6;
        break;
    case '7':
        holder+=7;
        break;
    case '8':
        holder+=8;
        break;
    case '9':
        holder+=9;
        break;
    default:
        break;
        }
    }
    if(holder%9==0)
        cout << "Yes" << '\n';
    else
        cout << "No" << '\n';
    return 0;
}


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

include<iostream>
using namespace std;
int main()
{
  long long n1;
  cin>>n1;
  long long sum=0;
  while(n1!=0)
  {
    sum+=n1%10;
    n1=n1/10;
  }
  if(sum%9==0)
  {
    cout<<"Yes"<<"\n";
  }
  else if(sum%9!=0)
  {
    cout<<"No"<<"\n";
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n1;
      |   ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<"Yes"<<"\n";
      |     ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout<<"No"<<"\n";
      |     ^~~~
Language: C++

#include <stdio.h>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;
typedef long long ll;

int main(){
	string N;
	cin >> N;
  	int sum = 0;
  	for(auto c: N){
      sum += (c-'0');
    }
  	string ans;
  	if(sum%9 == 0) ans = "Yes";
  	else ans = "No";
  
  	cout << ans << endl;

}#include <stdio.h>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;
typedef long long ll;

int main(){
	string N;
	cin >> N;
  	int sum = 0;
  	for(auto c: N){
      sum += (c-'0');
    }
  	string ans;
  	if(sum%9 == 0) ans = "Yes";
  	else ans = "No";
  
  	cout << ans << endl;

}

Compiler output:
a.cc:22:2: error: stray '#' in program
   22 | }#include <stdio.h>
      |  ^
a.cc:22:3: error: 'include' does not name a type
   22 | }#include <stdio.h>
      |   ^~~~~~~
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main(){
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){long long p=0;string s;cin>>s;long S=s.size();
             while(S){char c=s[S-1];p+=(c-'0');S--;s.pop_back();
                    }p%=9
if(p)cout<<"No"<<endl;else cout<<"Yes"<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected ';' before 'if'
    5 |                     }p%=9
      |                          ^
      |                          ;
    6 | if(p)cout<<"No"<<endl;else cout<<"Yes"<<endl;}
      | ~~                        
a.cc:6:23: error: 'else' without a previous 'if'
    6 | if(p)cout<<"No"<<endl;else cout<<"Yes"<<endl;}
      |                       ^~~~
Language: C++

#include<bits/stdc++.h> 
using namespace std; 
  
// Function to find that number divisible by 9 or not 
int check(string str) 
{ 
    // Compute sum of digits 
    int n = str.length(); 
    int digitSum = 0; 
    for (int i=0; i<n; i++) 
        digitSum += (str[i]-'0'); 
  
    // Check if sum of digits is divisible by 9. 
    return (digitSum % 9 == 0); 
} 
  
// Driver code 
int main() 
{ 
    string str
      cin>>str;
    check(str)?  cout << "Yes" : cout << "No "; 
    return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected initializer before 'cin'
   21 |       cin>>str;
      |       ^~~
a.cc:22:11: error: 'str' was not declared in this scope; did you mean 'std'?
   22 |     check(str)?  cout << "Yes" : cout << "No ";
      |           ^~~
      |           std
Language: C++

#include<bits/stdc++.h>

#define all(x) (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ll long long
#define ld long double
#define pb push_back
#define MOD 1000000007
#define LLMN LONG_LONG_MIN
#define LLMX LONG_LONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000000
#define pll pair<ll, ll>
#define vl vector<ll>
#define vll vector< vector<ll> >
#define vb vector<bool>
#define vbb vector< vector<bool> >    

using namespace std;   


        
int main()
 {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	string st;
  	ll t=0;
	cin>>st;
    for(ll i=0; i<st.length(). i++){
	t=t+ st[i] - '0';
    }
  	if(t%9 == 0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:32: error: request for member 'i' in 'st.std::__cxx11::basic_string<char>::length()', which is of non-class type 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   34 |     for(ll i=0; i<st.length(). i++){
      |                                ^
a.cc:34:35: error: expected ';' before ')' token
   34 |     for(ll i=0; i<st.length(). i++){
      |                                   ^
      |                                   ;
Language: C++

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

int main()
{
    string n;
    cin >> n;
    int a[10 ^ 200050];
    for (int i = 0; i < 10 ^ 200050;++i){
        if (n.at(i) == 0){
            a[i] = 0;
        }
        else if (n.at(i) == 1)
        {
            a[i] = 1;
        }
        else if (n.at(i) == 2)
        {
            a[i] = 2;
        }
        else if (n.at(i) == 3)
        {
            a[i] = 3;
        }
        else if (n.at(i) == 4)
        {
            a[i] = 4;
        }
        else if (n.at(i) == 5)
        {
            a[i] = 5;
        }
        else if (n.at(i) == 6)
        {
            a[i] = 6;
        }
        else if (n.at(i) == 7)
        {
            a[i] = 8;
        }
        else if (n.at(i) == 8)
        {
            a[i] = 8;
        }
        if (n.at(i) == 9)
        {
            a[i] = 9;
        }
    }
    int s = 0;
    for (int i; i < 10 ^ 200050;++i){
        s += a[i];
    }
    int b;
    b = s % 9;
    if(b!=0){
        cout << "No" < < < endl;
    }
    else{
        cout << "Yes" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: warning: result of '10^200050' is 200056; did you mean '1e200050'? [-Wxor-used-as-pow]
    8 |     int a[10 ^ 200050];
      |              ^
      |           --
      |           1  e
a.cc:8:11: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
    8 |     int a[10 ^ 200050];
      |           ^~
      |           0xa
a.cc:57:24: error: expected primary-expression before '<' token
   57 |         cout << "No" < < < endl;
      |                        ^
a.cc:57:26: error: expected primary-expression before '<' token
   57 |         cout << "No" < < < endl;
      |                          ^
Language: Java

#include <iostream>

using namespace std;

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

   long sum = 0;

   while(n != 0){
    sum += n % 10;
    n = n/10;
   }

   if(sum % 9 == 0){
    cout<<"YES";
   }
   else{
    cout<<"NO";
   }
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:7: error: not a statement
  long long n;
  ^
Main.java:8: error: not a statement
   cin>>n;
      ^
Main.java:18: error: not a statement
    cout<<"YES";
        ^
Main.java:21: error: not a statement
    cout<<"NO";
        ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
  long long n;
      ^
8 errors
Language: C

#include <stdio.h>
int main(void){
double a;
int sum=0;
  scanf("%lf", &a);
  while (a!=0){
    sum = sum + (a%10);
    a=a/10;
  }
if (sum%9==0){
  printf("Yes");
}
  else{
    printf("No");
  }
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:7:19: error: invalid operands to binary % (have 'double' and 'int')
    7 |     sum = sum + (a%10);
      |                   ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
ios::sync_with_stdio(0);
cin.tie(0);
int main() {
	string n;
	cin>>n;
	int sum = 0;
	int l = n.length();
	for (int i = 0;i < l;l++) {
		sum += n[i];
	}
	if (sum % 9 == 0)
		cout << "Yes";
	else
		cout << "No";
	return 0;
}


Compiler output:
a.cc:4:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
    4 | ios::sync_with_stdio(0);
      | ^~~
a.cc:5:1: error: 'cin' does not name a type
    5 | cin.tie(0);
      | ^~~
Language: Java

package T;

import java.util.Scanner;

public class AtCoder_176_B {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String n = sc.next();
	
		int count = 0;
		for(int i = 0; i < n.length(); i++) {
			count += (int)n.charAt(i);
		}
		
		if(n.equals("0")) count = 0;
		
		if(count % 9 == 0) System.out.println("Yes");
		else System.out.println("No");
		
	}

}


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

#include <stdio.h>
int main(void){
char a[];
int sum=0;
  scanf("%s", &a);
  while (a!=0){
    sum = sum + (a%10);
    a=a/10;
  }
if (sum%9==0){
  printf("Yes");
}
  else{
    printf("No");
  }
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:3:6: error: array size missing in 'a'
    3 | char a[];
      |      ^
main.c:7:19: error: invalid operands to binary % (have 'char *' and 'int')
    7 |     sum = sum + (a%10);
      |                  ~^
      |                  |
      |                  char *
main.c:8:8: error: invalid operands to binary / (have 'char *' and 'int')
    8 |     a=a/10;
      |       ~^
      |       |
      |       char *
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int n; cin>>n;
  string str= to_string(n);
  
  int sum=0;
  unsigned int i;
  for( i=0;i<str.length();i++){
     sum+=str[i]-'0';
  }
  if(sum==0 || sum%9==0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  
return 0;

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

#include <iostream> 
using namespace std; 
  
// Function to return dynamic allocated 
// array consisting integers individually 
int* GetBigInteger(string str) 
{ 
    int x = str.size(), a = 0; 
  
    // Create an array to store the big 
    // integer into it. 
  
    // Make the array size same as the 
    // size of string str 
    int* arr = new int[str.size()]; 
  
    // Loop to extract string elements 
    // into the array one by one 
    while (a != x) { 
  
        // Subtracting '0' to convert 
        // each character into digit 
  
        // str[a] - '0' 
        // = ASCII(str[a]) - ASCII('0') 
        // = ASCII(str[a] - 48 
        arr[a] = str[a] - '0'; 
        a++; 
    } 
  
    // Return the reference of the array 
    return arr; 
} 
  
// Driver Code 
int main() 
{ 
    // Big Integer in form of string str 
     string str;
    cin>>str;
    ll sum=0;
    // Function Call 
    int* arr = GetBigInteger(str); 
  
    // Print the digits in the arr[] 
    for (int i = 0; i < str.size(); i++) { 
       sum+=a[i];
    } 
    if(sum%9==0)
       cout<<"Yes";
    else
      cout<<"No"; 
    return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:41:5: error: 'll' was not declared in this scope
   41 |     ll sum=0;
      |     ^~
a.cc:47:8: error: 'sum' was not declared in this scope
   47 |        sum+=a[i];
      |        ^~~
a.cc:47:13: error: 'a' was not declared in this scope
   47 |        sum+=a[i];
      |             ^
a.cc:49:8: error: 'sum' was not declared in this scope
   49 |     if(sum%9==0)
      |        ^~~
Language: C

#include<stdio.h>
int main()
{ long long int N;
 int C = 0;
 int S = 0;
 scanf("%lld",&N);
 while(N!=0)
 { C = N%10;
  N = N/10;
  S = S+C;
 }
 if(S%9==0)
   printf("yes");
  else printf("No")
 return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:14:20: error: expected ';' before 'return'
   14 |   else printf("No")
      |                    ^
      |                    ;
   15 |  return 0;
      |  ~~~~~~
Language: Java



import java.util.*;
import java.io.*;

public class B {
	static FastReader in = new FastReader();

	public static void main(String[] args) {
		solve();
	}

	static void solve() {
		String[] n = in.nextLine().split("");
		long x = 0l;
		for(int i = 0; i < n.length; i++)
		{
			x += Integer.valueOf(n[i]);

		}
		System.out.println(x % 9 == 0 ? "Yes" : "No");
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		int[] readarr(int abc) {
			int[] a = new int[abc];
			for (int i = 0; i < abc; i++)
				a[i] = nextInt();
			return a;
		}
	}
}





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

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

int p(int n){
int sum =0;
  while(n>0){
  sum += n % 10;
    n /= 10;
  }
  return sum;
  
}


int main(){

int N;
cin >> N;
  int total;
  total = p(N);
  if (total%9==0){
   s ="Yes";
  }
  else{
   s= "No";
  }
  cout << s << endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:4: error: 's' was not declared in this scope
   22 |    s ="Yes";
      |    ^
a.cc:25:4: error: 's' was not declared in this scope
   25 |    s= "No";
      |    ^
a.cc:27:11: error: 's' was not declared in this scope
   27 |   cout << s << endl;
      |           ^
Language: C

#include <stdio.h>
int main(void){
long long long a;
int sum=0;
  scanf("%llld", &a);
  while (a!=0){
    sum = sum + (a%10);
    a=a/10;
  }
if (sum%9==0){
  printf("Yes");
}
  else{
    printf("No");
  }
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:3:11: error: 'long long long' is too long for GCC
    3 | long long long a;
      |           ^~~~
Language: C++

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

int main() {
  string n;
  cin >> n;
  int sum = 0;
  int length = n.size();
  int a;
  char c;
  
  for (int i = 0; i < length; i++){
    c = n.at(i);
    a = atoi(c.c_str());
    sum += a;
  }
  
  if (sum % 9 == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: request for member 'c_str' in 'c', which is of non-class type 'char'
   14 |     a = atoi(c.c_str());
      |                ^~~~~
Language: C++

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

int main() {
  string n;
  cin >> n;
  int sum = 0;
  int length = n.size();
  int a;
  char c;
  
  for (int i = 0; i < length; i++){
    c = n.at(i)
    a = atoi(c.c_str());
    sum += a;
  }
  
  if (sum % 9 == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'a'
   13 |     c = n.at(i)
      |                ^
      |                ;
   14 |     a = atoi(c.c_str());
      |     ~
Language: C++

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

int p(int n){
int sum =0;
  while(n>0){
  sum += n % 10;
    n /= 10;
  }
  retrun sum;
  
}


int main(){

int N;
cin >> N;
  int total;
  total = p(N);
  if (total%9==0){
   s ="Yes";
  }
  else{
   s= "No";
  }
  cout << s << endl;
  
  
}


Compiler output:
a.cc: In function 'int p(int)':
a.cc:10:3: error: 'retrun' was not declared in this scope
   10 |   retrun sum;
      |   ^~~~~~
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
a.cc: In function 'int main()':
a.cc:22:4: error: 's' was not declared in this scope
   22 |    s ="Yes";
      |    ^
a.cc:25:4: error: 's' was not declared in this scope
   25 |    s= "No";
      |    ^
a.cc:27:11: error: 's' was not declared in this scope
   27 |   cout << s << endl;
      |           ^
Language: C++

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

 string N;
 cin >> N;
 int L = N.size();

 int x = N.at()
 for(i=0; i < L; i++){
   x += N.at(i);
 }
 
 if(x%9==0){
   cout << "Yes" << endl;
 }
 else{
   cout << "No" << endl;
 }
}
   
   

Compiler output:
a.cc:5:2: error: 'cin' does not name a type
    5 |  cin >> N;
      |  ^~~
a.cc:8:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
    8 |  int x = N.at()
      |          ~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided
a.cc:9:11: error: 'i' does not name a type
    9 |  for(i=0; i < L; i++){
      |           ^
a.cc:9:18: error: 'i' does not name a type
    9 |  for(i=0; i < L; i++){
      |                  ^
a.cc:13:2: error: expected unqualified-id before 'if'
   13 |  if(x%9==0){
      |  ^~
a.cc:16:2: error: expected unqualified-id before 'else'
   16 |  else{
      |  ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
 long long sum=0;
  		std::string s;
 while(cin >> s){ 
 sum += atoi(s[i].c_str());
	}
  
 
if(sum%9==0)
{
  cout << "Yes" << endl;
}
else
{
   cout << "No" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'i' was not declared in this scope
    9 |  sum += atoi(s[i].c_str());
      |                ^
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  int sum=0;
  
  for(int i; i < N.size(); i++){
    
    sum+=N.at(i);
  }
  
  if(sum%9==0){
  
  cout << "Yes" <<endl;
    
  }
  
  else{
  
    cout << "No" <<endl;
    
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: request for member 'size' in 'N', which is of non-class type 'int'
   10 |   for(int i; i < N.size(); i++){
      |                    ^~~~
a.cc:12:12: error: request for member 'at' in 'N', which is of non-class type 'int'
   12 |     sum+=N.at(i);
      |            ^~
Language: C++

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

int p(int n){
int sum =0;
  while(n>0){
  sum += n % 10;
    n /= 10;
  }
  retrun sum;
  
}


int main(){

int N;
cin >> N;
  int total = 0;
  total = p(N);
  if (p%9==0){
   s ="Yes";
  }
  else{
   s= "No";
  }
  cout << s << endl;
  
  
}


Compiler output:
a.cc: In function 'int p(int)':
a.cc:10:3: error: 'retrun' was not declared in this scope
   10 |   retrun sum;
      |   ^~~~~~
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
a.cc: In function 'int main()':
a.cc:21:8: error: invalid operands of types 'int(int)' and 'int' to binary 'operator%'
   21 |   if (p%9==0){
      |       ~^~
      |       | |
      |       | int
      |       int(int)
a.cc:22:4: error: 's' was not declared in this scope
   22 |    s ="Yes";
      |    ^
a.cc:25:4: error: 's' was not declared in this scope
   25 |    s= "No";
      |    ^
a.cc:27:11: error: 's' was not declared in this scope
   27 |   cout << s << endl;
      |           ^
Language: Java

import java.util.*;
public class Main
{
  public static Scanner sc = new Scanner(System.in);
  public static void main(String[]args)
  {
    long n = sc.nextLong();
    int mod = 9;
    int sum =0;
    while(n>0)
    {
      sum +=n%10;
      sum%mod;
      n=n/10;
    }
    if(sum==0 || sum%mod==0)
    	System.out.println("Yes");
    else
        System.out.println("No");
                           
  }
}


Compiler output:
Main.java:13: error: not a statement
      sum%mod;
         ^
1 error
Language: C

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


int main() {
  string s;
  cin>>s;
  long long int sum=0;
  for(int i=0;i<s.length();i++)
  {
    sum=sum+s[i]-'0';
  }
  if(sum%9==0)
  printf("Yes\n");
  else
  printf("No");
}

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

N = input()
t = sum(list(map(int, N)))
if t % 9 == 0:
  print('Yes')
else:
  print('No')

Compiler output:
a.cc:4:9: warning: multi-character character constant [-Wmultichar]
    4 |   print('Yes')
      |         ^~~~~
a.cc:6:9: warning: multi-character character constant [-Wmultichar]
    6 |   print('No')
      |         ^~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = input()
      | ^
Language: C++


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


#define ll long long int
#define ld long double
#define mod 1000000007
#define big 1e18+10
#define small -big
#define pb push_back



template <typename T>

void prarr(T a)
{
     cerr << "[ ";
     
     for(auto i : a){
         cerr << i << " ";
     }
     
     cerr << "]" << endl;
}


#define trace(...) _er(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>

void _er(const char* name, Arg1&& arg1){
	cerr << "[" << name << " : " << arg1 << "]" << endl;
}

template <typename Arg1, typename... Args>

void _er(const char* names, Arg1&& arg1, Args&&... args){
    
	const char* comma = strchr(names + 1, ',');
	cerr << "[" ; cerr.write(names, comma - names) << " : " << arg1 << "] ";
	_er(comma+2, args...);
}






void solve() {
    
   string N;
   cin >> N;
   
   ll sum = 0;
   ll a = 9;
   
   for(ll i = 0; i < N.size(); i++) {
            sum = (sum % a) * (10LL % a) % a;
            sum = (((sum % a) + ((N[i] - 48) % a)) % a)
   }
   
   if(sum == 0LL) {
        cout << "Yes" << endl;
   } else {
        cout << "No" << endl;
   }
}


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

    int t=1;
    //cin >> t;

    for(int i = 1; i <= t; i++) {  
   
         solve();
    }


    return 0;
        
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:61:56: error: expected ';' before '}' token
   61 |             sum = (((sum % a) + ((N[i] - 48) % a)) % a)
      |                                                        ^
      |                                                        ;
   62 |    }
      |    ~
Language: C++

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

int main() {
  int N ;
  ans=0 ;
  cin >> N;
while (N>0) {ans+=N%10 ;
            N=N/10 ;}
 if (ans%9==0){cout << "Yes" <<endl;}
 else {cout << "No" << endl;} 

  // ここにプログラムを追記
}


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

#include <iostream>      // cout, endl, cin
#include <string>        // string, to_string, stoi
#include <vector>        // vector
#include <algorithm>     // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility>       // pair, make_pair
#include <tuple>         // tuple, make_tuple
#include <cstdint>       // int64_t, int*_t
#include <cstdio>        // printf
#include <map>           // map
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <deque>         // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset>        // bitset
#include <cctype>        // isupper, islower, isdigit, toupper, tolower
#include <iomanip>       // fixed, setprecision
using namespace std;

int main()
{
  string N;
  cin >> N;
  uint64_t s = 0;
  for (int i = 0; i < N.length(); i++)
  {
    s += stoi(N.substr(i, 1));
  }
  cout << (s % 9 == 0 ? "Yes" : "No") << endl;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>      // cout, endl, cin
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
  ll s;
  cin>>s;
  long long int i=0;
  long long sum=0;
  while(s)
  {
    ll rem=s%10;
    s/=10;
    sum+=rem;
  }
  if(n%9==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: 'n' was not declared in this scope
   16 |   if(n%9==0)
      |      ^
Language: C++


using namespace std;

int main()
{
    long long n;
    cin>>n;
    long long sum = 0;
    while(n>0)
    {
        sum += n%10;
        n = n/10;
    }
    if(sum%9==0)
    {
        cout<<"Yes"<<endl;
    }
    else
    {
        cout<<"No"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout<<"Yes"<<endl;
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:22: error: 'endl' was not declared in this scope
   16 |         cout<<"Yes"<<endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | 
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<"No"<<endl;
      |         ^~~~
a.cc:20:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:21: error: 'endl' was not declared in this scope
   20 |         cout<<"No"<<endl;
      |                     ^~~~
a.cc:20:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  int N ;
  ans=0 ;
  cin >> N;
while (N>0) {ans+=N%10 ;
            N=N/10}
 if (ans%9==0){cout << "Yes" <<endl;}
 else {cout << "No" << endl;} 

  // ここにプログラムを追記
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |   ans=0 ;
      |   ^~~
      |   abs
a.cc:10:19: error: expected ';' before '}' token
   10 |             N=N/10}
      |                   ^
      |                   ;
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main() {
    string str;
    string strin[20000];
    int a[200000];
    int sum = 0;
    cin >> str;
for(int i =0; i < str.size(); i++){
   strin[i] = str.at(i);
     }
 for(int i =0; i < str.size(); i++){
   a[i] = atoi(strin[i].c_str());
     }
  

  for(int i =0; i < str.size(); i++){
   sum += a[i];
     }

   if((sum % 9) == 0){
       cout << "Yes" << endl;
   }else{
       cout << "No" << endl;
   }
  

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

use proconio::{fastout, input};
#[fastout]
fn main() {
    input! {n:String}
    let mut sum = 0;
    if n == "0" {
        println!("No");
    } else {
        for i in n.chars() {
            sum += i as i32;
        }
        if sum % 9 == 0 {
            println!("Yes");
        } else {
            println!("No");
        }
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'use'
    1 | use proconio::{fastout, input};
      | ^~~
main.c:1:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    1 | use proconio::{fastout, input};
      |             ^~
main.c:2:2: error: invalid preprocessing directive #[
    2 | #[fastout]
      |  ^
main.c:3:1: error: unknown type name 'fn'
    3 | fn main() {
      | ^~
main.c: In function 'main':
main.c:4:5: error: 'input' undeclared (first use in this function); did you mean 'int'?
    4 |     input! {n:String}
      |     ^~~~~
      |     int
main.c:4:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:10: error: expected ';' before '!' token
    4 |     input! {n:String}
      |          ^
      |          ;
main.c:6:8: error: expected '(' before 'n'
    6 |     if n == "0" {
      |        ^
      |        (
main.c:6:8: error: 'n' undeclared (first use in this function)
Language: C

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

int main()
{
    char S[200001]={};
    scanf("%s",S);
    int count=0;

    int i;
    for(i=0;i<strlen(S);i++)
    {
        count+=int(S[i])%9;
    }
    if(count%9==0)
    {
        printf("Yes");
    }
    else
    {
        printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:16: error: expected expression before 'int'
   14 |         count+=int(S[i])%9;
      |                ^~~
Language: C

use proconio::{fastout, input};


Compiler output:
main.c:1:1: error: unknown type name 'use'
    1 | use proconio::{fastout, input};
      | ^~~
main.c:1:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    1 | use proconio::{fastout, input};
      |             ^~
Language: C++

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

int main() {
  int N ;
 int ans=0 ;
  cin >> N;
while (N>0) {ans+=N%10
            N=N/10}
 if (ans%9==0){cout << "Yes" <<endl;}
 else {cout << "No" << endl;} 

  // ここにプログラムを追記
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before 'N'
    9 | while (N>0) {ans+=N%10
      |                       ^
      |                       ;
   10 |             N=N/10}
      |             ~
Language: C++

int main()
{
    string s;
    cin>>s;
    long long int ans=0;
    for (long long int i=0;i<s.size();++i)
    {
        ans+=int(s[i]-'0');
        
    }
    
    ans%9==0?cout<<"YES"<<endl:cout<<"NO"<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string s;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>s;
      |     ^~~
a.cc:4:10: error: 's' was not declared in this scope
    4 |     cin>>s;
      |          ^
a.cc:12:14: error: 'cout' was not declared in this scope
   12 |     ans%9==0?cout<<"YES"<<endl:cout<<"NO"<<endl;
      |              ^~~~
a.cc:12:27: error: 'endl' was not declared in this scope
   12 |     ans%9==0?cout<<"YES"<<endl:cout<<"NO"<<endl;
      |                           ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
void s(long long int  m)
{
long long int s1,d,
 while(m>=0)
 {
 d=n%10;
   s1=s1+d;
   m=m/10;
 
 }
}

main()
{
long long int k;
  cin>>k;
  if(s(k)%9==0)
    cout<<"Yes";
  else
    cout<<"No";


}

Compiler output:
a.cc: In function 'void s(long long int)':
a.cc:6:2: error: expected unqualified-id before 'while'
    6 |  while(m>=0)
      |  ^~~~~
a.cc: At global scope:
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   15 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:10: error: invalid operands of types 'void' and 'int' to binary 'operator%'
   19 |   if(s(k)%9==0)
      |      ~~~~^~
      |       |   |
      |       |   int
      |       void
Language: C++

#include<iostream>
#include<cmath>
#include<iomanip>
#define ll long long
using namespace std;
int main() {
	ll num=0;
	string s;
	cin>>s;
	int len=s.size();
	for(int i=0; i<len; i++) {
		num+=s[i]-'0';
	}
	if(sum%9==0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'sum' was not declared in this scope; did you mean 'num'?
   14 |         if(sum%9==0) cout<<"Yes"<<endl;
      |            ^~~
      |            num
Language: C++

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

int main() {
  int N ;
  ans=0 ;
  cin >> N;
while (N>0) {ans+=N%10
            N=N/10}
 if (ans%9==0){cout << "Yes" <<endl;}
 else {cout << "No" << endl;} 

  // ここにプログラムを追記
}


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

#include<string>
#include<iostream>
#include <algorithm>
#include<vector>
#include<functional>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <numeric>
#include <math.h>
#define ll long long 
#define PI 3.14159265358979323846
#define rep(i,n) for(ll i=0;i<(ll)n;i++)
#define rep1(x,n) for(ll x=1;x<(ll)n+1;x++)
using namespace std;

int main() {
	ll N;
	cin >> N;
	ll souwa = 0;
	while (N > 0) {
		souwa += N % 10;
		N /= 10;
	}
	if (souwa % 9 == 0)cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: expected '}' at end of input
   27 |         return 0;
      |                  ^
a.cc:17:12: note: to match this '{'
   17 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
      	int n = 0;
      	for (i=0; i<200001; i++) {
          int x = 10^(200000-i);
          n += a/x;
          a = a%x;
        }
		// 出力
      	if (n%9 == 0) {
			System.out.println("Yes");
		} else {
          	System.out.println("No");
        }
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
      	for (i=0; i<200001; i++) {
      	     ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      	for (i=0; i<200001; i++) {
      	          ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      	for (i=0; i<200001; i++) {
      	                    ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
          int x = 10^(200000-i);
                             ^
  symbol:   variable i
  location: class Main
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
double digit_sum(double n){
  if(n<10){
    return n;
  }
  else{
    return digit_sum(n/10)+n%10;
  }
}
int main(){
  double n;
  cin >> n;
  if(digit_sum(n)%9==0){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'double digit_sum(double)':
a.cc:8:29: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |     return digit_sum(n/10)+n%10;
      |                            ~^~~
      |                            | |
      |                            | int
      |                            double
a.cc: In function 'int main()':
a.cc:14:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   14 |   if(digit_sum(n)%9==0){
      |      ~~~~~~~~~~~~^~
      |               |   |
      |               |   int
      |               double
Language: C++

#include<iostream>
using namespaces std;
int main(){
	string a;
  cin>>a;
    long long r=0,n=a.size();
  for(long long i=0;i<n;i++){
  	r+=(a[i]-48);
  }
  if(r%9)	cout<<"No";
  else	cout<<"Yes";
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string a;
      |         ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a;
      |        ^
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   if(r%9)       cout<<"No";
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   else  cout<<"Yes";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
  string a;
  
  cin >> a;
  ll sum = 0;
  rep(i, a.size()){
    sum += atoi(a.at(i).c_str());
  }
  
  if(sum % 9 == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}
 
 //vector<int> a(3);
 //a.at(0);
 //a.size();
 //vector<vector<int>> a(3, vector<int>(3));
 //uint64_t sum = 0;
 //max(a, b);
 //min(a, b);
 //swap(a, b);
 //sort(vec.begin(), vec.end());  昇順
 //reverse(vec.begin(), vec.end());  降順


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: request for member 'c_str' in 'a.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   14 |     sum += atoi(a.at(i).c_str());
      |                         ^~~~~
Language: C

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

int main()
{
    unsigned long long int n;
    cin>>n;
    if(n%9==0)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    
}

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

import java.util.*;
class Solution
{
	public static void main(String []args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String s = "";
		while(s.length() != 1)
		{
			int temp = 0;
			for(int i =0;i<str.length();i++)
			{
				temp += Integer.parseInt(str.charAt(0));
			}
			s = s + temp;
		}
		if(s == "9")
		{
			System.out.print("Yes");
		}
		else
		{
			System.out.print("No");
		}
    }
}

Compiler output:
Main.java:14: error: incompatible types: char cannot be converted to String
				temp += Integer.parseInt(str.charAt(0));
				                                   ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <cstdio>
#include <cstring>
int ans;
char s[200005];
void Read() {
	int i;
	scanf("%s", s);
	int SIZ = strlen(s);
	for(i = 0; i < SIZ; i++) {
		ans += s[i] - '0';
		ans %= 9
	}
	if(ans == 0)
		printf("Yes");
	else
		printf("No");
}
int main() {
	Read();
	return 0;
}

Compiler output:
a.cc: In function 'void Read()':
a.cc:11:25: error: expected ';' before '}' token
   11 |                 ans %= 9
      |                         ^
      |                         ;
   12 |         }
      |         ~