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

#include<bits/stdc++.h>
using namespace std;
int main() {
    string s;
    cin >> s;
    int sum = 0,y;
    for(int i = 0; i < s.size(); i++){
        sum += stoi(s[i]);
    }
    if(sum%9 == 0 ){
        cout << "YES" << endl;
    }
    else
    cout <<"NO" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
    8 |         sum += stoi(s[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<bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	int sum=0,z;
	cin>>s;
	
	for(int i=0;i<s.length();i++)
	{
		
		z = stoi(s[i]);
		sum+=z;
		
	}
	if(sum%9==0)
	cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   13 |                 z = stoi(s[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++

def digit_sum(n):
    n_lst = list( str(n) )
    n_sum = 0
    for i in range( len(n_lst) ):
        n_sum += int( n_lst[i] )
    return n_sum
 
n1 = input()
if digit_sum(n1)%9==0 : print("Yes")
else: print("No"

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def digit_sum(n):
      | ^~~
Language: C++

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

int main()
{
	string s;
	int sum=0,z;
	cin>>s;
	
	for(int i=0;i<s.length();i++)
	{
		
		z = stoi(s[i]);
		sum+=z;
		
	}
	if(sum%9==0)
	cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |                 z = stoi(s[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 <stdio.h>
#include <math.h>

using namespace std;

int main()
{
    long long n;
    cin >> n;
    int a[200000];
    for (int i = 0; i < 200000; i++)
    {
        a[i] = (n % 10);
        n /= 10;
    }
    long long = 0;
    for (int i = 0; i < 200000; i++)
    {
        number = (number+a[i])%9;
    }
    if (number % 9 == 0)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected unqualified-id before '=' token
   17 |     long long = 0;
      |               ^
a.cc:20:9: error: 'number' was not declared in this scope
   20 |         number = (number+a[i])%9;
      |         ^~~~~~
a.cc:22:9: error: 'number' was not declared in this scope
   22 |     if (number % 9 == 0)
      |         ^~~~~~
Language: C++

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

int main(){

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ',' or ';' before 'n'
    7 |   int sum = 0  n = s.length();
      |                ^
a.cc:8:18: error: 'n' was not declared in this scope
    8 |   for(int i=0; i<n; i++)
      |                  ^
Language: C++

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

int main(){

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'll' was not declared in this scope
    6 | ll n; cin>>n;
      | ^~
a.cc:6:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 | ll n; cin>>n;
      |            ^
      |            yn
Language: Java

public class Main1 {
	static String findMultiple(int N){
      	long sum=0;
    	while(N>0) {
      		sum=sum+(N%10);
      		N=N/10;
      	}
      	if(sum%9==0)
          return "Yes";
      	return "No";
    }
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
      	int N=sc.nextInt();
      	System.out.println(findMultiple(N));
	}

}


Compiler output:
Main.java:1: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
Main.java:14: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main1
Main.java:14: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		               ^
  symbol:   class Scanner
  location: class Main1
3 errors
Language: Java


public class Main1 {
	static String findMultiple(int N){
      	long sum=0;
    	while(N>0) {
      		sum=sum+(N%10);
      		N=N/10;
      	}
      	if(sum%9==0)
          return "Yes";
      	return "No";
    }
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
      	int N=sc.nextInt();
      	int X=sc.nextInt();
      	int T=sc.nextInt();
      	System.out.println(findTime(N,X,T));
	}

}


Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
Main.java:15: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main1
Main.java:15: error: cannot find symbol
		Scanner sc=new Scanner(System.in);
		               ^
  symbol:   class Scanner
  location: class Main1
Main.java:19: error: cannot find symbol
      	System.out.println(findTime(N,X,T));
      	                   ^
  symbol:   method findTime(int,int,int)
  location: class Main1
4 errors
Language: C++

//============================================================================
// Name        : template.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <bits/stdc++.h>
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE // suppress some compilation warning messages (for VC++ users)
// Shortcuts for "common" data types in contests
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef set<int> si;
typedef map<string, int> msi;
// To simplify repetitions/loops, Note: define your loop style and stick with it!
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define forn(i,n) \
for (int i =0; i<(n); i++)
#define TRvi(c, it) \
for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define INF 2000000000 // 2 billion
// If you need to recall how to use memset:
#define MEMSET_INF 127 // about 2B
#define MEMSET_HALF_INF 63 // about 1B
//memset(dist, MEMSET_INF, sizeof dist); // useful to initialize shortest path distances
//memset(dp_memo, -1, sizeof dp_memo); // useful to initialize DP memoization table
//memset(arr, 0, sizeof arr); // useful to clear array of integers

// int main() {
// 	ios::sync_with_stdio(false);
//  cin.tie(0);
//  int n,x,t; cin >> n >> x >> t;
//  int ans = ((n + x -1) / x) * t;
//  cout << ans << "\n";
// return 0;
// }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	string s;
	ll sm = 0;
	cin >> s;
	forn(i, s.length()) {
		int i = s[i] + '0';
		sm += i;
	}
	if (sm % 9 == 0) cout << "Yes\n";
	else cout << "No\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:21: error: redeclaration of 'int i'
   58 |                 int i = s[i] + '0';
      |                     ^
a.cc:57:14: note: 'int i' previously declared here
   57 |         forn(i, s.length()) {
      |              ^
a.cc:27:10: note: in definition of macro 'forn'
   27 | for (int i =0; i<(n); i++)
      |          ^
Language: C++

#include<bits/stdc++.h>
#include<cstdlib>
using namespace std;
int main()
{
	int i,j,temp,size,num=0;
	string str;
	cin >> str;
	for(i=0;i<str.size();i++)
	{
		num += atoi(str[i]);
	}
	if(num % 9 == 0)
		cout << "Yes" << endl;
	else
		cout << "No" << endl; 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   11 |                 num += atoi(str[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/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 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 <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	// your code goes here
	ll n;
	cin>>n;
	string s=to_string(n);
	ll sum=0;
  ll n=s.length();
	for(ll i=0;i<n;i++)
	sum+=(s[i]-'0');
	if(sum%9==0)
	cout<<"Yes"<<"\n";
	else
	cout<<"No"<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: redeclaration of 'long long int n'
   10 |   ll n=s.length();
      |      ^
a.cc:6:12: note: 'long long int n' previously declared here
    6 |         ll n;
      |            ^
Language: Java


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

   private static final String INPUT_FILE_PATH = "";

   void solve() {
      String s = in.nextToken();
      int sum = 0;
      for (char c : s.toCharArray()) {
         sum += c - '0';
         sum %= 9;
      }
      out.println(sum == 0 ? "Yes" : "No");
   }

   private final InputReader in;
   private final PrintWriter out;

   private B(InputReader in, PrintWriter out) {
      this.in = in;
      this.out = out;
   }

   private static class InputReader {
      private BufferedReader br;
      private StringTokenizer st;

      public InputReader(InputStream inputStream) {
         this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);
         this.st = null;
      }

      public String nextToken() {
         while (st == null || !st.hasMoreTokens()) {
            try {
               st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
               throw new RuntimeException(e);
            }
         }
         return st.nextToken();
      }

      public int nextInt() {
         return Integer.parseInt(nextToken());
      }

      public long nextLong() {
         return Long.parseLong(nextToken());
      }

      public double nextDouble() {
         return Double.parseDouble(nextToken());
      }
   }

   public static void main(String[] args) throws Exception {
      InputStream inputStream = INPUT_FILE_PATH.isEmpty()
         ? System.in
         : new FileInputStream(new File(INPUT_FILE_PATH));
      OutputStream outputStream = System.out;

      InputReader inputReader = new InputReader(inputStream);
      PrintWriter printWriter = new PrintWriter(outputStream);

      new B(inputReader, printWriter).solve();

      printWriter.close();
   }

}


Compiler output:
Main.java:29: error: invalid method declaration; return type required
   private B(InputReader in, PrintWriter out) {
           ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll t = 0, g;
  char n;
  while (cin >> n) {
    g = (ll)(n);
    t += g;
  }
  if ( t % 9 == 0) {
    cout << "Yes";
  } else {
    cout << "No";
  }

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

/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class B
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         String input = st.nextToken();
         int sum = 0;
         for(int i=0; i < input.length(); i++)
            sum += (input.charAt(i)-'0');
         String res = sum%9 == 0 ? "Yes" : "No";
         System.out.println(res);
      }
   }

Compiler output:
Main.java:22: 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 main()
{
    string s;
    int sum = 0;
    cin >> a;
    for(int i=0;i<s.size();i++)
    {
        sum += s[i];
    }
    if( sum%9==0 || s =="0")
    {
        cout << "Yes";
    }
    else cout << "No";
}


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

#include <bits/stdc++.h>
using namespace std;
#define ll long long int 
#define ld double
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define pll pair <ll,ll>
#define nl "\n"
 
int main()
{
	ios_base::sync_with_stdio(false);
	string str;
	cin>>str;
	ll n = str.length(), su = 0;
	for(i=0;i<n;i++)
	{
		su = (su + (str[i]-'0'))%9;
	}
	if(su%9==0)
		cout<<"Yes\n";
	else
		cout<<"No\n";
	return 0;
}

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

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

  int main() {
  string s;
  cin >> s;
  int ans = 0;
  int a= s.size();
  for (int i = 0; i < a; i++) {
    ans += s[i] //- '0';
  }
  if (ans % 9 == 0) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
   10 |     ans += s[i] //- '0';
      |                ^
      |                ;
   11 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: expected initializer before 'sum'
    5 | ll sum = 0,n;
      |    ^~~
a.cc:6:8: error: 'n' was not declared in this scope
    6 |   cin>>n;
      |        ^
a.cc:9:6: error: 'sum' was not declared in this scope
    9 |      sum = sum + n % 10;
      |      ^~~
a.cc:12:6: error: 'sum' was not declared in this scope
   12 |   if(sum%9==0)
      |      ^~~
Language: C++

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

  int main() {
  string s;
  cin >> s;
  int ans = 0;
  int a= s.size()
  for (int i = 0; i < a; i++) {
    ans += s[i] - '0';
  }
  if (ans % 9 == 0) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i = 0; i < a; i++) {
      |   ^~~
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for (int i = 0; i < a; i++) {
      |                   ^
Language: C++

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

  int main() {
  string s;
  cin >> s;
  int ans = 0;
  size_t size= str.length()
  for (int i = 0; i < size; i++) {
    ans += s[i] - '0';
  }
  if (ans % 9 == 0) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   size_t size= str.length()
      |                ^~~
      |                std
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for (int i = 0; i < size; i++) {
      |                   ^
Language: C++

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

  int main() {
  string s;
  cin >> s;
  int ans = 0;
  size_t size= str.length(s)
  for (int i = 0; i < size; i++) {
    ans += s[i] - '0';
  }
  if (ans % 9 == 0) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   size_t size= str.length(s)
      |                ^~~
      |                std
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for (int i = 0; i < size; i++) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define fo(i,n) for(ll i=0;i<n;i++)
#define fok(i,k,n) for(ll i=k;i<n;i++)
#define ci(x) cin>>x
#define ci2(x,y) cin>>x>>y
#define co(x) cout<<x<<"\n"
#define co2(x,y) cout<<x<<" "<<y<<"\n"
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define PI 3.1415926535897932384626
#define deb1(x) cout<<#x<<" "<<x<<endl
#define deb2(x,y) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<"\n"
#define deb3(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<"\n"
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pll;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pll>		vpll;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
const int mod = 1000000007;	
int gcd(int a, int b){ if(a==0) return b; return gcd(b%a, a);}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int tc=1;
	//ci(tc);
	while(tc--){
		string n;
		ci(n);
		ll sum=0;
		for(int i=0;i<n.size();i++){
			sum+=(s[i]-'0');
		}
		if(sum%9==0) co("YES");
		else co("NO");		
	}
	return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |   int len = strlen(s)
      |                    ^
      |                    |
      |                    std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:8:19: error: 'i' was not declared in this scope
    8 |   for (int i = 0; i < len; i++) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define fo(i,n) for(ll i=0;i<n;i++)
#define fok(i,k,n) for(ll i=k;i<n;i++)
#define ci(x) cin>>x
#define ci2(x,y) cin>>x>>y
#define co(x) cout<<x<<"\n"
#define co2(x,y) cout<<x<<" "<<y<<"\n"
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define PI 3.1415926535897932384626
#define deb1(x) cout<<#x<<" "<<x<<endl
#define deb2(x,y) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<"\n"
#define deb3(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<"\n"
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pll;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pll>		vpll;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
const int mod = 1000000007;	
int gcd(int a, int b){ if(a==0) return b; return gcd(b%a, a);}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int tc=1;
	//ci(tc);
	while(tc--){
		string n;
		ci(n);
		ll sum=0;
		for(int i=0;i<n.size();i++){
			sum+=((int)s[i]);
		}
		if(sum%9==0) co("YES");
		else co("NO");		
	}
	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
typedef pair<ii ,ii> iii;
typedef long long ll;
int main()
{
  ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        string s;
        cin>>s;
        long long int sum=0;
        long long n=s.size();
        forlong long int i=0;i<n;i++)
        {
            sum+=(int)s[i]-48;
        }

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



Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'forlong' was not declared in this scope; did you mean 'ulong'?
   14 |         forlong long int i=0;i<n;i++)
      |         ^~~~~~~
      |         ulong
a.cc:14:30: error: 'i' was not declared in this scope
   14 |         forlong long int i=0;i<n;i++)
      |                              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    4 |   int main() {
      |           ^~
a.cc:4:11: note: remove parentheses to default-initialize a variable
    4 |   int main() {
      |           ^~
      |           --
a.cc:4:11: note: or replace parentheses with braces to value-initialize a variable
a.cc:4:14: error: a function-definition is not allowed here before '{' token
    4 |   int main() {
      |              ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: storage size of 'n' isn't known
    5 |   char n[];
      |        ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
char a[200100];
long long int i,j=0,k;
gets(a);
k=strlen(a);
for(i=0;i<k-1;i++){
    j+=a[i]-'0';
if(j%9==0){
    printf("Yes\n");
}
else
    printf("No\n");
}


Compiler output:
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 | gets(a);
      | ^~~~
      | fgets
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String SS[] =S.split("",0);
    int N =SS.length();
    long ans =0;
    int t;
    for(int i=0;i<N;i++){
      t=Integer.parseInt(SS[i]);
      ans =ans+t;
      ans =ans%9;}
    if(ans ==0){System.out.println("Yes");}
    else{System.out.println("No");}
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
    int N =SS.length();
             ^
  symbol:   method length()
  location: variable SS of type String[]
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: redeclaration of 'int n'
    7 |     int n=strlen(a);
      |         ^
a.cc:5:15: note: 'int n' previously declared here
    5 |     int sum=0,n;
      |               ^
a.cc:7:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |     int n=strlen(a);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: redeclaration of 'int n'
    7 |     int n=strlen(a);
      |         ^
a.cc:5:15: note: 'int n' previously declared here
    5 |     int sum=0,n;
      |               ^
a.cc:7:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |     int n=strlen(a);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
char a[200100];
int i,j,k,r=0;
gets(a);
k=strlen(a);
for(i=0;i<k-1;i++){
    j=a[i]-'0';
    r+=j;
}
if(r%9==0){
    printf("Yes\n");
}
else
    printf("No\n");
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
  cin>>s;
  long long int cnt=0;
  map<char,int>m[10];
  char c=48;
  for(int i=1;i<=10;i++)
  {
    m[c]=i;
    c+=1;
  }
  for(int i=0;i<s.size();i++)
  {
    cnt+=m[s[i]];
  }
  if(cnt%9==0)
    cout<<"Yes";
  else
    cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator=' (operand types are 'std::map<char, int>' and 'int')
   12 |     m[c]=i;
      |          ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:331:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  331 |       operator=(const map&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:331:17: note:   no known conversion for argument 1 from 'int' to 'const std::map<char, int>&'
  331 |       operator=(const map&) = default;
      |                 ^~~~~~~~~~
/usr/include/c++/14/bits/stl_map.h:335:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  335 |       operator=(map&&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:335:17: note:   no known conversion for argument 1 from 'int' to 'std::map<char, int>&&'
  335 |       operator=(map&&) = default;
      |                 ^~~~~
/usr/include/c++/14/bits/stl_map.h:349:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(std::initializer_list<std::pair<const _Key, _Val> >) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  349 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:349:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<std::pair<const char, int> >'
  349 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:17:8: error: no match for 'operator+=' (operand types are 'long long int' and 'std::map<char, int>')
   17 |     cnt+=m[s[i]];
      |     ~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
  cin>>s;
  long long int cnt=0;
  map<char,int>m[10];
  char c='1';
  for(int i=1;i<=10;i++)
  {
    m[c]=i;
    c+=1;
  }
  for(int i=0;i<s.size();i++)
  {
    cnt+=m[s[i]];
  }
  if(cnt%9==0)
    cout<<"Yes";
  else
    cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator=' (operand types are 'std::map<char, int>' and 'int')
   12 |     m[c]=i;
      |          ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:331:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  331 |       operator=(const map&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:331:17: note:   no known conversion for argument 1 from 'int' to 'const std::map<char, int>&'
  331 |       operator=(const map&) = default;
      |                 ^~~~~~~~~~
/usr/include/c++/14/bits/stl_map.h:335:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  335 |       operator=(map&&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:335:17: note:   no known conversion for argument 1 from 'int' to 'std::map<char, int>&&'
  335 |       operator=(map&&) = default;
      |                 ^~~~~
/usr/include/c++/14/bits/stl_map.h:349:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>& std::map<_Key, _Tp, _Compare, _Alloc>::operator=(std::initializer_list<std::pair<const _Key, _Val> >) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >]'
  349 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:349:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<std::pair<const char, int> >'
  349 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:17:8: error: no match for 'operator+=' (operand types are 'long long int' and 'std::map<char, int>')
   17 |     cnt+=m[s[i]];
      |     ~~~^~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |     int len=strlen(a);
      |                    ^
      |                    |
      |                    std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
    string s; cin >> s;
    int res = 0;
    for(int i=0; i<s.length(); i++) {
        res += (s[i] - '0')
    }
    if(res % 9 == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before '}' token
    9 |         res += (s[i] - '0')
      |                            ^
      |                            ;
   10 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string a;
    int n;
    int sum=0;
    cin >> n;
    while(a[i]!='\0'){
        sum=sum+a[i];
        i++
    }
    if(sum%9==0){
        cout << "Yes";
    }else{
        cout << "No";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |     while(a[i]!='\0'){
      |             ^
Language: C++

#include<bits/stdc++.h>

 
#define long long ll;
using namespace std;
int main()
{
  string n;
  cin>>n;
  ll sum=0;
  for(int i=0; i<(int)n.size(); i++){
    sum+=n[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:10:3: error: 'll' was not declared in this scope
   10 |   ll sum=0;
      |   ^~
a.cc:12:5: error: 'sum' was not declared in this scope
   12 |     sum+=n[i]-'0';
      |     ^~~
a.cc:15:6: error: 'sum' was not declared in this scope
   15 |   if(sum%9==0){
      |      ^~~
Language: C++

#include <cstdio>
int main(){
    char s[200000];
    scanf("%s",s);
    int len=strlen(s);
    int sum;
    for(int i=0;i<len;i++) sum+=int(s[i]);
    if(sum%9==0){
        puts("Yse");
    }else{
        puts("No");
    }

/*
#include <iostream>
int64_t mul_9(int64_t n){
    int64_t sum=0;
    //std::cin >> n;
    while(n!=0){
        sum=sum+n%10;
        std::cout <<" "<<sum<<std::endl;
        n=n/10;
        std::cout <<" "<<n<<std::endl;
    }
    
    return sum;
}
int main(){
    int64_t n,sum;
    std::cin >> n;
    sum=mul_9(n);
    //std::cout <<sum<<std::endl;
    if(sum%9==0){
        std::cout <<"Yes"<<std::endl;
    }else{
        std::cout <<"No" <<std::endl;
    }
    return 0;
}
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'strlen' was not declared in this scope
    5 |     int len=strlen(s);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdio>
  +++ |+#include <cstring>
    2 | int main(){
a.cc:12:6: error: expected '}' at end of input
   12 |     }
      |      ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,n) for(int i=1;i<(int)(n);i++)
 
typedef long long ll;
using namespace std;
int main()
{
  string n;
  cin>>n;
  ll sum=0;
  for(int=0; i<(int)n.length(); i++){
    sum+=n[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:12:10: error: expected unqualified-id before '=' token
   12 |   for(int=0; i<(int)n.length(); i++){
      |          ^
a.cc:12:10: error: expected ';' before '=' token
   12 |   for(int=0; i<(int)n.length(); i++){
      |          ^
      |          ;
a.cc:12:10: error: expected primary-expression before '=' token
a.cc:12:14: error: 'i' was not declared in this scope
   12 |   for(int=0; i<(int)n.length(); i++){
      |              ^
a.cc:12:31: error: expected ')' before ';' token
   12 |   for(int=0; i<(int)n.length(); i++){
      |      ~                        ^
      |                               )
a.cc:12:33: error: 'i' was not declared in this scope
   12 |   for(int=0; i<(int)n.length(); i++){
      |                                 ^
Language: C++

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

char s[200010];
int main(){
    scanf("%s",s);
    int len=strlen(s);
    int sum=0;
    for(int i=0;i<len;i++)sum+=s[i]-'0';
    if(sum%9==0){
        puts("Yes");
    }else{
        puts("No");
    }
}

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

//Fast IO + Debug Template
#include <bits/stdc++.h>

using namespace std;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

#define pb push_back
#define gl(x) getline(cin,x)
#define gc(x) cin.get(x)
#define sz(x) (int)(x.size())
#define al(x) (x).begin(),(x).end()
#define ms(a, b) memset(a,b,sizeof(a))
#define sp ' '
#define nl '\n'
#define f first
#define s second
#define lsb(x) ((x)&(-x))
#define mp make_pair
#define m(x, y) (x + y) / 2
#define MOD 1000000007
#define gcd(x,y) __gcd(m,n);
#define perm(x) next_permutation(x.begin(), x.end());
#define bs(x,z) binary_search(x.begin(),x.end(),z);
#define lb(x,z) lower_bound(x.begin(),x.end(),z);
#define ub(x,z) upper_bound(x.begin(),x.end(),z);
#define nl '\n'


void sc(){}template<class T,class...A>void sc(T&t,A&...a){cin>>t,sc(a...);}
void pr(){}template<class T,class...A>void pr(T t,A...a){cout<<t,pr(a...);}
typedef long long ll;
typedef pair<int, int> pi;
//weighted (with adjList[])
typedef vector<pi> vii;
//unweighted (with adjList[])
typedef vector<int> vi;
typedef double db;
typedef long double ld;


const int INF = 0x3f3f3f3f;
const int NINF = -INF;
ld a;
int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
	cin >> a;
	if (a % 9 == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	
	debug();
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:15: error: invalid operands of types 'ld' {aka 'long double'} and 'int' to binary 'operator%'
   74 |         if (a % 9 == 0) cout << "Yes" << endl;
      |             ~ ^ ~
      |             |   |
      |             |   int
      |             ld {aka long double}
Language: C

#include<stdio.h>

int main(){
  int a[200000];
  for(int i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  
  int sum=0;
  for(int i=0;i<N;i++){
    sum+=a[i];
  }
  if(sum%9!=0){
    printf("No\n");
  }else{
    printf("Yes\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: 'N' undeclared (first use in this function)
    5 |   for(int i=0;i<N;i++){
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


Compiler output:
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout << sum << endl;
      |   ^~~~
a.cc:23:3: error: expected unqualified-id before 'return'
   23 |   return 0;
      |   ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java

import java.util.*;
class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
  char c[]=sc.next.toCharArray();
  int ans=0;
  for(int i=0;i<c.length;i++){
    ans+=(c[i]-'0');
  }System.out.println(ans%9==0?"Yes":"No");
}
}

Compiler output:
Main.java:5: error: cannot find symbol
  char c[]=sc.next.toCharArray();
             ^
  symbol:   variable next
  location: variable sc of type Scanner
1 error
Language: C++

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

int main(){
    char a[200010];
    int i=0;
    while(1){
        cin >> a[i];
        if(a[i]=="\0"){
            break;
        }
        i++;
    }

    int len = strlen(a);
    int sum=0;
    for(int  j=0;j<=len;j++){
        sum +=a[j]-48;
    }
    if(sum%9==0){
        cout << "Yes" <<endl;
    }
    else{
        cout << "No" <<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(a[i]=="\0"){
      |            ~~~~^~~~~~
Language: C

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

int main(void)
{
  char s[20000];
  long long int sum = 0,i;
  
  scanf("%s", s);
  
  int l = strlen(s);
  
  for(i = 0;i < l;i++)
    sum += s[i] - '0';
  
  if(sum%9==0)
    printf("Yes";
  else
    printf("No");         

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:17: error: expected ')' before ';' token
   18 |     printf("Yes";
      |           ~     ^
      |                 )
main.c:22:12: error: expected ';' before '}' token
   22 |   return 0;
      |            ^
      |            ;
   23 | }
      | ~
Language: C++

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

int main(){
    char a[200010];
    int i=0;
    while(1){
        cin >> a[i];
        if(a[i]==\0){
            break;
        }
        i++;
    }

    int len = strlen(a);
    int sum=0;
    for(int  j=0;j<=len;j++){
        sum +=a[j]-48;
    }
    if(sum%9==0){
        cout << "Yes" <<endl;
    }
    else{
        cout << "No" <<endl;
    }
}

Compiler output:
a.cc:9:18: error: stray '\' in program
    9 |         if(a[i]==\0){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(long long i=0; i<(n); ++i)
#define REP(i, d, n) for(long long i=(d); i<(n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;

int main() {

  ll n; cin>>n;
  if(n%9==0){cout<<"Yes"<<emdl;}
  else{cout<<"No"<<endl;}
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 'emdl' was not declared in this scope
   11 |   if(n%9==0){cout<<"Yes"<<emdl;}
      |                           ^~~~