criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[]args){
	int ans=0;
        Scanner sc = new Scanner(System.in);
        int N=sc.nextInt();
        if(sumDigits(N)%9==0){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
    public static int sumDigits(int n){
	int sum = 0;
        while (n != 0){
            sum += n % 10;
            n /= 10;
        }
    }
}


Compiler output:
Main.java:21: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.*;
class Main
{
	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:27: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int i;
  i = 10^200000;
  int A;
  A = 0;
  while (i=>1) {
    A = A + ( N / i );
    N = N - ( N / i ) * i;
    i = i / 10;
  }
  cout << A;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: warning: result of '10^200000' is 200010; did you mean '1e200000'? [-Wxor-used-as-pow]
    8 |   i = 10^200000;
      |         ^
      |       ---
      |       1e
a.cc:8:7: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
    8 |   i = 10^200000;
      |       ^~
      |       0xa
a.cc:11:12: error: expected primary-expression before '>' token
   11 |   while (i=>1) {
      |            ^
Language: C++

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

int main(){
  int N,sum = 0;
  cin >> N;
  for(i=1;i<200000;i++){
    sum += N%10;
    N = N/10;
  }
  if(sum%9 == 0) cout << "Yes";
  else cout << "No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=1;i<200000;i++){
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int i;
  i = 10^200000;
  int A;
  A = 0;
  while (i=>1) {
    A = A + ( N / i );
    N = N - ( N / i ) * i;
    i = i / 10;
  }
  cout << A
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: warning: result of '10^200000' is 200010; did you mean '1e200000'? [-Wxor-used-as-pow]
    8 |   i = 10^200000;
      |         ^
      |       ---
      |       1e
a.cc:8:7: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
    8 |   i = 10^200000;
      |       ^~
      |       0xa
a.cc:11:12: error: expected primary-expression before '>' token
   11 |   while (i=>1) {
      |            ^
a.cc:16:12: error: expected ';' before '}' token
   16 |   cout << A
      |            ^
      |            ;
   17 | }
      | ~
Language: C++

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'long long long' is too long for GCC
    5 |  long long long n;
      |            ^~~~
Language: C++

#include<bits/stc++.h>
using namespace std;
int main()
{
  long long int n;
  cin>>n;
  long long int sum=(n*(n+1))/2;
  if(sum%9==0)
    cout<<"Yes";
  else
     cout<<"No";
}

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

#include <iostream>
#include <cmath>
#include <cstring>
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 5;
int main()
{
    char s[MAXN];
    gets(s);
    ll cnt = 0;
    for(ll i = 0; i < strlen(s); i++) cnt += s[i] - '0';
    if(cnt % 9 == 0) cout << "Yes";
	else cout << "No"; 
    return 0;
}

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

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

Compiler output:
a.cc:5:7: error: extended character 　 is not valid in an identifier
    5 |   int sum　= 0,dig=0;
      |       ^
a.cc: In function 'int main()':
a.cc:9:5: error: 'sum' was not declared in this scope
    9 |     sum = sum + dig;
      |     ^~~
a.cc:12:6: error: 'sum' was not declared in this scope
   12 |   if(sum % 9 == 0){
      |      ^~~
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<51; i++) {
          int x = 10^(50-i);
          n += a/x;
          a = a%x;
        }
		// 出力
      	if (n%9 == 0) {
			System.out.println("Yes");
		} else {
          	System.out.println("No");
        }
}


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

class Main {
 
	//最大公約数・最小公倍数（セットで使う）
static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
static int lcm (int a, int b) {return a*b/gcd(a,b);}
   //整数かどうかを判定する
 static boolean isInteger(double number){return Math.ceil(number) == Math.floor(number); }

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
 
		String s = sc.next();
		char[] c = s.toCharArray();

		if(s.equals("0")){
			System.out.println("Yes");
		}
		Long ans = 0l;
		for(int i=0;i<s.length();i++){
			ans += c[i];
		}
		System.out.println(ans);
		if(ans%9 == 0){
			System.out.println("Yes");
		} else System.out.println("No");
	}
}

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

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.math.BigInteger; 
public class B_Multiple_of_9
{
     static Scanner sc=new Scanner(System.in);
    static PrintWriter out=new PrintWriter(System.out);
    static void pn(Object o)
     {
    out.println(o);
    out.flush();
    
    }
    static void p(Object o)
    {
    out.print(o);
    out.flush();
    }
    static void pni(Object o)
    {
    out.println(o);System.out.flush();
    }
        static int I() throws IOException
    { 
    return sc.nextInt();
    }
    static long L()throws IOException
    {
    return sc.nextLong();
    }
    static double D()throws IOException
    {
    return sc.nextDouble();
    }
    static String S()throws IOException
    {
    return sc.next();
        }
     static void process() throws IOException
     {
         String s=S();long k=0;
          for(int i=0;i<s.length();i++)
          {
             k=k+((int)s.charAt(i)-48);
            }
          if(k%9==0)
          {
              pn("Yes");
            }
            else
            {
                pn("No");
            }
        }
        public static void main(String[] args) throws IOException
{
   try
{
        process();
 }
catch(Exception e)
{
return;
}
}
             
         
       }
   

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  string n;
  cin>>n;
  long long a=0;
  for(long long i=0;i<n.size();i++)a+=(stoi)n.at(i);
  if(a%9==0){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:44: error: overloaded function with no contextual type information
    7 |   for(long long i=0;i<n.size();i++)a+=(stoi)n.at(i);
      |                                            ^
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<101; i++) {
          int x = 10^(100-i);
          n += a/x;
          a = a%x;
        }
		// 出力
      	if (n%9 == 0) {
			System.out.println("Yes");
		} else {
          	System.out.println("No");
        }
}


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

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

int main() {
  char n[] = "";
  int size;
  cin >> n;
  size = sizeof(n)
  cout << size << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'cout'
    9 |   size = sizeof(n)
      |                   ^
      |                   ;
   10 |   cout << size << endl;
      |   ~~~~
Language: Java

import java.util.Scanner;

public class Mul_9
{
    public static void main(String args[])
    {
        Scanner sc =new Scanner(System.in);
        long n=sc.nextLong();
        long sum=0;
        while(n!=0)
        {
            sum=sum+n%10;
            n=n/10;
        }
        if(sum%9==0)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int a;
      |   ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'long long long' is too long for GCC
   12 |   unsigned long long long int n;
      |                      ^~~~
Language: Java

import java.util.Scanner;
public class Solution {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String num = scan.next();
		long sum = 0;
		for(char c : num.toCharArray()) sum+=(c-'0');
		System.out.println(sum%9 == 0 ? "Yes" : "No");
		scan.close();
	}
}

Compiler output:
Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
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:19: error: reached end of file while parsing
}
 ^
1 error
Language: C

#include <stdio.h>
 
int main(void) {
  int total = 0;
  char number;
  while (number = getchar()) != EOF) {
  	total += (number - '0');
  }
  if (total % 9 == 0)
    printf("Yes");
  else
    printf("No");
  return 1;
}

Compiler output:
main.c: In function 'main':
main.c:6:30: error: expected expression before '!=' token
    6 |   while (number = getchar()) != EOF) {
      |                              ^~
main.c:6:36: error: expected statement before ')' token
    6 |   while (number = getchar()) != EOF) {
      |                                    ^
Language: C

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

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
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:10: error: ';' expected
          n += a/x
                  ^
Main.java:19: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

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

public class AtCoder {


    public static void main(String[] args) throws Exception {

        FastReader fs = new FastReader();
        out = new PrintWriter(new BufferedOutputStream(System.out));

       String s = fs.next();

       long ans = 0 ;
       long mod = 9 ;

       for(int i=0; i<s.length() ; i++ ){
           long dig = s.charAt(i) - 48 ;
           ans = (ans%mod + dig%mod)%mod;
       }

       if(ans == 0){
           out.println("Yes");
       }else{
           out.println("No");
       }

        out.close();

    }

    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public 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;
        }

    }
    //--------------------------------------------------------
}



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

//Code by ASIM FOIZE AIMON
//CSE'19;CUET
//avoid copy paste//Hit the frined button
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define precise cout.precision(10); cout << fixed;
#define endl "\n"
#define int int64_t
#define ll long long
#define yes printf("Yes\n")
#define no printf("No\n")
main()
{
    ll int n,sum=0,m;
    cin>>n;
    while(n>0)
    {
        m=n%10;
        sum=sum+m;
        n=n/10;
    }
    if(sum % 9==0)
        yes;
    else
        no;
}


Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:12: error: expected initializer before 'n'
   15 |     ll int n,sum=0,m;
      |            ^
a.cc:16:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   16 |     cin>>n;
      |          ^
      |          yn
a.cc:19:9: error: 'm' was not declared in this scope; did you mean 'tm'?
   19 |         m=n%10;
      |         ^
      |         tm
a.cc:20:9: error: 'sum' was not declared in this scope
   20 |         sum=sum+m;
      |         ^~~
a.cc:23:8: error: 'sum' was not declared in this scope
   23 |     if(sum % 9==0)
      |        ^~~
Language: C++

#include <iostream> 
using namespace std; 

typedef long long int ll;
typedef long unsigned lu;
typedef vector<ll> v;
typedef pair<ll,ll> p;
typedef vector <p> vp;
#define rep(i,j,k) for(ll i=j;i<k;i++)
#define repr(i,j,k) for(ll i=k;i>=j;i--)
#define read(a,n) rep(i,0,n) cin>>a[i];
#define show(a,n) rep(i,0,n) cout<<a[i]<<" ";
#define modulus 1000000007
#define MAX 100005
#define INF 1000000001
// #define cinv vl a(n) rep(i,0,n) { cin>>a[i]; }
#define fastio() ios_base::sync_with_stdio(false); cin.tie(NULL);
ll a[MAX]={0};
ll dp[MAX];

int main()
{
    fastio();
    string s;
    cin>>s;
    ll sum=0;
    for (int i = 0; i < s.size(); i++)
    {
        sum+= s[i]-48;
    }
    if(sum%9==0)
        cout<<"Yes"<<"\n";
    else
        cout<<"No"<<"\n";
}

// void mod(ll l)
// {
//     if(l>=0)
//     {
//         cout<<l%modulus<<"\n";
//     }
//     else
//     {
//         while(l<0)
//         {
//             l+=modulus;
//         }
//         cout<<l<<"\n";
//     }
    
// }
 
// ll power(ll a, ll b)
// {
//     for (ll i = 1; i <= b; i++)
//     {
//         a*=a;
//     }
    
//     return a;
// }
 
// ll sumdigit(ll a)
// {
//     ll sum=0;
//     while(a)
//     {
//         a=sum%10;
//         a=a/10;
//     }
// }

Compiler output:
a.cc:6:9: error: 'vector' does not name a type
    6 | typedef vector<ll> v;
      |         ^~~~~~
a.cc:8:9: error: 'vector' does not name a type
    8 | typedef vector <p> vp;
      |         ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected ')' before '{' token
    8 |   for(int i=0;i<n.size();i++
      |      ~                      ^
      |                             )
    9 |   {
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'Yes' was not declared in this scope
   18 |     cout << Yes << endl;
      |             ^~~
a.cc:21:13: error: 'No' was not declared in this scope; did you mean 'N'?
   21 |     cout << No << endl;
      |             ^~
      |             N
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:16:3: error: expected declaration or statement at end of input
   16 |   return 0;
      |   ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected ',' or ';' before 'scanf'
    6 |   scanf("%d", &a);
      |   ^~~~~
main.c:16:3: error: expected declaration or statement at end of input
   16 |   return 0;
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define vi vector<int>
#define vvi vector<vi>
#define FOI(i,n) for(int i=0; i<n; i++)
#define FOI2(i,a,n) for(int i=a; i<n; i++)
#define pii pair<int, int>
#define ppii pair<int, pii>
#deine vp vector<pii>
#define endl '/n'
#define MOD (1e9+7)

const int N = 1e5+5;
int n;
int i, j, k, l;

// void solve() {
// }

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

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

    if(sum%9 == 0)
        cout << "Yes" << endl;

    return 0;
}


Compiler output:
a.cc:12:2: error: invalid preprocessing directive #deine; did you mean #define?
   12 | #deine vp vector<pii>
      |  ^~~~~
      |  define
a.cc:35:26: warning: multi-character character constant [-Wmultichar]
   35 |         cout << "Yes" << endl;
      |                          ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    string n;
    cin >> n;
    ll sum=0;
    rep(i,n.size()){
        sun+=n.at(i);
    }
    if(sum%9==0) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'sun' was not declared in this scope; did you mean 'sum'?
   13 |         sun+=n.at(i);
      |         ^~~
      |         sum
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  if(n % 9 == 0){
    cout << "Yes";
  }
    else{
      cout <<"No"
    }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '}' token
   10 |       cout <<"No"
      |                  ^
      |                  ;
   11 |     }
      |     ~             
a.cc:11:6: error: expected '}' at end of input
   11 |     }
      |      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include <stdio.h>

int main(void) {
  int total = 0;
  char number;
  while (number = getchar()) != EOF) {
  	total += (number - '0');
  }
  if (total % 9 == 0)
    printf("Yes");
  else
    printf("No");
}

Compiler output:
main.c: In function 'main':
main.c:6:30: error: expected expression before '!=' token
    6 |   while (number = getchar()) != EOF) {
      |                              ^~
main.c:6:36: error: expected statement before ')' token
    6 |   while (number = getchar()) != EOF) {
      |                                    ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define fileio freopen("http://in.in", "r", stdin),freopen("out.out", "w", stdout);
#define ll long long
#define pb push_back
#define pll pair<ll,ll>
#define ff first
#define ss second
#define N 2000001
#define M 1000000007
#define INF 1000000000000000


int main()
{
	string s;
	ll ans=0;
	cin>>s;
	ll i;
	for(i=0;i<n;i++)
	{
		ans=ans+(ll)s[i]-'0';
	}
	if(ans%9)cout<<"NO";
	else cout<<"YES";

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'n' was not declared in this scope
   22 |         for(i=0;i<n;i++)
      |                   ^
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mod 1000000007
#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,start,end) for(int i=start; i<=end; i++)
#define repd(i,start,end) for(int i=start; i>=end; i--)
#define all(x) x.begin(),x.end()

void solve() {
	string s;
	cin >> s;
	ll ans=0;

	for(char c: s)
		ans+=c-'0';

	if(ans%9==0)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;


}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int t=1;
	//cin >> t;
	while(t--) {
		solve();
	}
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'int'
   11 |     sum=sum+int[s[i]];
      |             ^~~
Language: C++

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

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

    int sum = 0;
    while(n <= 0){
        n /= 10;
        sum += 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:18:17: error: 'No' was not declared in this scope
   18 |         cout << No << endl;
      |                 ^~
Language: C

numlist = list(input())

n = 0;
for num in numlist:
  n += int(num)
  n %= 9
if n == 0:
  print('Yes')
else:
  print('No')


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | numlist = list(input())
      | ^~~~~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'numlist' [-Wimplicit-int]
main.c:1:11: error: implicit declaration of function 'list' [-Wimplicit-function-declaration]
    1 | numlist = list(input())
      |           ^~~~
main.c:1:16: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | numlist = list(input())
      |                ^~~~~
main.c:1:11: error: initializer element is not constant
    1 | numlist = list(input())
      |           ^~~~
main.c:3:1: error: expected ',' or ';' before 'n'
    3 | n = 0;
      | ^
main.c:4:1: error: expected identifier or '(' before 'for'
    4 | for num in numlist:
      | ^~~
main.c:8:9: warning: multi-character character constant [-Wmultichar]
    8 |   print('Yes')
      |         ^~~~~
main.c:10:9: warning: multi-character character constant [-Wmultichar]
   10 |   print('No')
      |         ^~~~
Language: C++

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

Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include<iostream>;
      |                   ^
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << "Yes" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << "Yes" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "No" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << "No" << endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include<math.h>
#include <stdlib.h>
#include <queue>
using namespace std;
#define Minf -1e9
#define scan(n) scanf("%lld",&n)
typedef long long ll;
const int maxn = 2*1e5+10;
const ll INF = 1e9+100;
const int mod = 998244353;

char a[maxn];
int main()
{
	scanf("%s", &a);
	int te = 0;
	int len = strlen(a);
	for (int i = 0; i < len; i++) {
		te += a[i] - '0';
		te %= 9;
	}
	if (te % 9 == 0) {
		cout << "YES\n";
	}
	else cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'strlen' was not declared in this scope
   23 |         int len = strlen(a);
      |                   ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <stdlib.h>
  +++ |+#include <cstring>
    9 | #include <queue>
Language: Java

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

constexpr char NL = '\n';
constexpr int MOD = 1e9 + 7;

struct safe_hash {
    static uint64_t splitmix64(uint64_t x) {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

void solve()
{
    string n; cin >> n;
    int val = 0;
    for (char c : n) {
        val += c - '0';
    }
    cout << (val % 9 == 0 ? "Yes" : "No") << NL;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
using ll = long long;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: '.class' expected
using ll = long long;
                ^
Main.java:5: error: class, interface, enum, or record expected
constexpr char NL = '\n';
^
Main.java:6: error: class, interface, enum, or record expected
constexpr int MOD = 1e9 + 7;
^
Main.java:8: error: class, interface, enum, or record expected
struct safe_hash {
^
Main.java:11: error: class, interface, enum, or record expected
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        ^
Main.java:12: error: class, interface, enum, or record expected
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        ^
Main.java:13: error: class, interface, enum, or record expected
        return x ^ (x >> 31);
        ^
Main.java:14: error: class, interface, enum, or record expected
    }
    ^
Main.java:18: error: class, interface, enum, or record expected
        return splitmix64(x + FIXED_RANDOM);
        ^
Main.java:19: error: class, interface, enum, or record expected
    }
    ^
Main.java:24: error: not a statement
    string n; cin >> n;
                  ^
Main.java:29: error: not a statement
    cout << (val % 9 == 0 ? "Yes" : "No") << NL;
                                          ^
Main.java:34: error: not a statement
    ios::sync_with_stdio(false);
    ^
Main.java:34: error: ';' expected
    ios::sync_with_stdio(false);
                        ^
17 errors
Language: C++

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int64_t n;
  cin>>n;
  while(n!=0){
    int x=0;
    x+=n%10;
    n/=10;
  }
  if(x!=0&&x%9==0){cout<<"Yes"<<endl;}
  else {cout<<"No"<<endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'x' was not declared in this scope
   11 |   if(x!=0&&x%9==0){cout<<"Yes"<<endl;}
      |      ^
Language: Java

import java.util.*;
import java.math.*;
public class Solution {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int add = 0;
		for(int i = 0; i < s.length(); i++) {
			int cur = Integer.parseInt(s.substring(i, i + 1));
			add += cur;
		}
		if(add % 9 == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}

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

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include<math.h>
#include <queue>
using namespace std;
#define Minf -1e9
#define scan(n) scanf("%lld",&n)
typedef long long ll;
const int maxn = 2*1e5+10;
const ll INF = 1e9+100;
const int mod = 998244353;

char a[maxn];
int main()
{
	scanf("%s", &a);
	int te = 0;
	int len = strlen(a);
	for (int i = 0; i < len; i++) {
		te += a[i] - '0';
		te %= 9;
	}
	if (te % 9 == 0) {
		cout << "YES\n";
	}
	else cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'strlen' was not declared in this scope
   22 |         int len = strlen(a);
      |                   ^~~~~~
a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include<math.h>
  +++ |+#include <cstring>
    8 | #include <queue>
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <tuple>
#include <random>
#include <cmath>

using namespace std;

typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

const ll SIZE = 1e6 * 2 + 10, INF = 1e9 * 1e9 + 10;



int main()
{
    fastInp;

    string s;
    cin >> s;
    
    ll sm =  0;
    for (auto e : s)
        sm += (e - '0');

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

Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: error: 'sum' was not declared in this scope; did you mean 'sm'?
   35 |     if (sum % 9 == 0) {
      |         ^~~
      |         sm
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include<math.h>
#include <queue>
using namespace std;
#define Minf -1e9
#define scan(n) scanf("%lld",&n)
typedef long long ll;
const int maxn = 2*1e5+10;
const ll INF = 1e9+100;
const int mod = 998244353;

char a[maxn];
int main()
{
	scanf("%s", a);
	int te = 0;
	int len = strlen(a);
	for (int i = 0; i < len; i++) te += a[i] - '0',te%=9;
	if (te % 9 == 0) {
		cout << "YES\n";
	}
	else cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'strlen' was not declared in this scope
   22 |         int len = strlen(a);
      |                   ^~~~~~
a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include<math.h>
  +++ |+#include <cstring>
    8 | #include <queue>
Language: C++

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

using namespace std;

int main(){
  	string s;
  	cin >> s;
  	int count=0;
  	for(int i=0;i<s.size();i++){
      	count += atoi(s[i]);
    }
  	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |         count += atoi(s[i]);
      |                  ~~~~^~~~~~
      |                      |
      |                      __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <cstdio>
#include <cstring>
using namespace std;
int sum;
char ch[200005];
int main(){
	gets(ch);
	for(int i=0;i<strlen(ch);++i)sum+=ch[i]-'0';
	if(sum%9){
		printf("No\n");
	}else{
		printf("Yes\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(ch);
      |         ^~~~
      |         getw
Language: C++

#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 += stoi(s.at(i));
  }
  
  if((sum % 9) == 0){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   11 |     sum += stoi(s.at(i));
      |            ~~~~^~~~~~~~~
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:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

using namespace std;

int main(){
  	string s;
  	cin >> s;
  	int count=0;
  	for(int i=0;i<s.size();i++){
      	count += atof(s[i].c_str());
    }
  	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((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'}
   12 |         count += atof(s[i].c_str());
      |                            ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb() push_back()

//global vars

void solve() {
    string a;
    cin >> a;
    int sum = 0;
    for (int i = 0; i < a.length(), i++) {
        sum += a[i];
    }
    if (sum % 9 == 0) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

int main() {
    int t = 1;
    //cin >> t;
    while(t--) {
        solve();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:14:40: error: expected ';' before ')' token
   14 |     for (int i = 0; i < a.length(), i++) {
      |                                        ^
      |                                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define ii pair<int, int>
#define vii vector<ii>
#define vvi vector<vi>
#define vvii vector<vii>
#define ld long double
#define iii tuple<int, int, int>
#define sc scanf
#define pb push_back
#define FOR for(int i=1; i<=n; ++i)

int main() {

    string s;
    cin>>s;

    int n = s.length();

    ll sum = 0LL;

    for(int i=0; i<n; ++i) {
        sum += (s[i] - 48);
    }

    if(sum%9 == 0) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define ii pair<int, int>
#define vii vector<ii>
#define vvi vector<vi>
#define vvii vector<vii>
#define ld long double
#define iii tuple<int, int, int>
#define sc scanf
#define pb push_back
#define FOR for(int i=1; i<=n; ++i)

int main() {

    string s;
    cin>>s;

    int n = s.length();

    ll sum = 0LL;

    for(int i=0; i<n; ++i) {
        sum += (s[i] - 48);
    }

    if(sum%9 == 0) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
}

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

#include<bits/stdc++.h>
#define INF 1000000007
#define inf 10000000
#define mod 1000000007
using namespace std;
template <typename T> T Max(T X,T Y){return X>Y?X:Y;}
template <typename T> T Min(T X,T Y){return X<Y?X:Y;}
int sum=0;
char c[200005];
int main()
{
	gets(c);
	for(int i=0;i<strlen(c);i++)
	{
		int num=c[i]-'0';
		sum+=num;
	}
	if(sum%9==0)
	{
		puts("Yes");
	}
	else
	{
		puts("No");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |         gets(c);
      |         ^~~~
      |         getw
Language: C++

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

using namespace std;

int main(){
  	int s;
  	cin >> s;
  	int count=0;
  	for(int i=0;i<s.size();i++){
      	count += atof(s[i].c_str());
    }
  	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: request for member 'size' in 's', which is of non-class type 'int'
   11 |         for(int i=0;i<s.size();i++){
      |                         ^~~~
a.cc:12:24: error: invalid types 'int[int]' for array subscript
   12 |         count += atof(s[i].c_str());
      |                        ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main() {
  string n;
  cin >> n;
  int k = 0;
  for (int i = 0; i < n.length(); i++) {
    k += atoi(n[i]);
  }
  if (k % 9 == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    9 |     k += atoi(n[i]);
      |          ~~~~^~~~~~
      |              |
      |              __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: Java

X  =  input().strip()  ;
t = 0 ;
for r in X : 
	t += int ( r ) ;

print ( "Yes" if t % 9 == 0 else "No" ) ;

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
X  =  input().strip()  ;
^
Main.java:2: error: class, interface, enum, or record expected
t = 0 ;
^
Main.java:3: error: class, interface, enum, or record expected
for r in X : 
^
Main.java:6: error: class, interface, enum, or record expected
print ( "Yes" if t % 9 == 0 else "No" ) ;
^
4 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long N;
  cin >> N;
  while(N > 0){
    sum = sum + N % 10;
    N = N / 10;
  }
  if(sum % 9 == 0){
    cout << 'Yes' << endl;
  }
  else{
    cout << 'No' << endl;
  }
}

Compiler output:
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |     cout << 'Yes' << endl;
      |             ^~~~~
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 |     cout << 'No' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'sum' was not declared in this scope
    7 |     sum = sum + N % 10;
      |     ^~~
a.cc:10:6: error: 'sum' was not declared in this scope
   10 |   if(sum % 9 == 0){
      |      ^~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int dp[1002][1002];
const int MOD = (int)1e9 + 7;
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    string s;
    cin >> s;
    ll sum = 0;
    for (int i = 0; i < s.size(); i++)
        sum += ll(s[i] - '0');
    if(sum % 9 == 0)
        cout << "Yes\n";
    else
        cout << "No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:13:16: note: in expansion of macro 'll'
   13 |         sum += ll(s[i] - '0');
      |                ^~
Language: C++

#include <iostream>
#include <string>
#include <stdlib>

using namespace std;

int main(){
  	int s;
  	cin >> s;
  	int count=0;
  	for(int i=0;i<s.size();i++){
      	count += atof(s[i].c_str());
    }
  	cout << count << endl;
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
    string s;
    cin>>s;
    int ans=0;
    for(int i=0;i<n;i++){
        ans+=s[i]-48;
    }
    if(ans%9)cout<<"No\n";
    else cout<<"Yes\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'n' was not declared in this scope
    9 |     for(int i=0;i<n;i++){
      |                   ^