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

#include<bits/stdc++.h>
using namespace std;
#define FIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl '\n'
#define fo(i,n) for(int i=0;i<=n;++i)
#define Fo(i,k,n) for(int i=k;i<n;++i)
typedef long long int lli;
int main(){
    FIO
    int N; cin>>N;
    int rem,s=0;
    fo(i,n){
        rem=N%10;
        s=s+rem;
        N=N/10;
    }
  if(s%9==0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'n' was not declared in this scope
   12 |     fo(i,n){
      |          ^
a.cc:5:32: note: in definition of macro 'fo'
    5 | #define fo(i,n) for(int i=0;i<=n;++i)
      |                                ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(void) {
    string n;
    cin >> n;
    long length = n.size();
    long add = 0;
    for(int i = 0; i < length; i++){
        add += (long)(n.at(i) - '0');
    }
    if((long)add % 9 == 0){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    return 0;


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

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

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

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

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


int main() {

int N;
cin >> N;

string str = N;
  
int sum = 0;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 | string str = N;
      |              ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fr(a,b) for(int i = a; i < b; i++)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define inf (1LL<<60)
#define all(x) (x).begin(), (x).end()
#define prDouble(x) cout << fixed << setprecision(10) << x
#define triplet pair<ll,pair<ll,ll>>
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) 
 using namespace std;
int SumOfDigits(int x) {
 
 if (x<10) return x*(x+1)/2;
 
 int d = log10(x); //number of digits less one
 int p = pow(10,d);
 int msd = x/p;
 
 return (msd * a[d]) + (msd * (msd-1)/2 * p) + (msd * (1+ x%p) + SumOfDigits(x%p);
} int main()
 {
 	
 	ll n;
 	cin>>n;
 	if(SumOfDigits(n)%9==0)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;



 	
 	
 	
 	return 0;
 }
 


Compiler output:
a.cc: In function 'int SumOfDigits(int)':
a.cc:21:16: error: 'a' was not declared in this scope
   21 |  return (msd * a[d]) + (msd * (msd-1)/2 * p) + (msd * (1+ x%p) + SumOfDigits(x%p);
      |                ^
a.cc:21:82: error: expected ')' before ';' token
   21 |  return (msd * a[d]) + (msd * (msd-1)/2 * p) + (msd * (1+ x%p) + SumOfDigits(x%p);
      |                                                ~                                 ^
      |                                                                                  )
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main(){
int n, count; count = 0;
string N; cin >> N;
  vector<char> a(N.begin(), N.end());
  n = a.size();
  for(int i = 0; i < n; i++){
  count += atoi(a.at(i));
  }
  if(count % 9 = 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   11 |   count += atoi(a.at(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)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:13:12: error: lvalue required as left operand of assignment
   13 |   if(count % 9 = 0)
      |      ~~~~~~^~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        long n=0;
        long sum=0;
        while (t<s.length()){
            int num=Integer.parseInt(String.valueOf(s.charAt((int) n)));
            sum=sum+num;
            n++;
        }
        if (sum%9==0){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        while (t<s.length()){
               ^
  symbol:   variable t
  location: class Main
1 error
Language: C++

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




int main(){


  string s,p;
   cin >> s;
  int sum=0;
  for(int i=0;i<s.size();i++){
    sum+=stoi(s[i]);
  }
  if(sum%9==0){
   p="Yes";
  }
  else{
   p="No";
  }
  cout << p << endl;
}


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

int main() {

int N;
cin >> N;

string str = N;
  
int sum = 0;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
    4 | cin >> N;
      | ^~~
a.cc:6:1: error: 'string' was not declared in this scope
    6 | string str = N;
      | ^~~~~~
a.cc:11:10: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |   sum += str.at(i);
      |          ^~~
      |          std
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << "No" << endl;
      |     ^~~~
a.cc:17:21: error: 'endl' was not declared in this scope
   17 |     cout << "No" << endl;
      |                     ^~~~
Language: Java

import java.util.Scanner;

public class parrot {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        long n=0;
        long sum=0;
        while (n<s.length()){
            int num=Integer.parseInt(String.valueOf(s.charAt((int) t)));
            sum=sum+num;
            n++;
        }
        if (sum%9==0){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:3: error: class parrot is public, should be declared in a file named parrot.java
public class parrot {
       ^
Main.java:10: error: cannot find symbol
            int num=Integer.parseInt(String.valueOf(s.charAt((int) t)));
                                                                   ^
  symbol:   variable t
  location: class parrot
2 errors
Language: C++

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




int main(){


  string s,p;
   cin >> s;
  int sum=0;
  for(int i=0;i<s.size();i++){
    sum+=stoi(s[i]);
  }
  if(sum%9==0){
   p="Yes";
  }
  else{
   p="No" ;
  }
  cout << p << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |     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<iostream>
using namespace std;
int main()
{
       string t; unsigned long long int t;
      cin >> t ;
    for(unsigned long long int i=0; i<t.size(); i++)
    {
      
      
      
      
      
      
       a=a+((int)t[i]);
      }
        if(a%9==0)
        {
            cout << "Yes" << "\n" ;
        }
   else
   {
     cout << "No" << "\n" ; 
   }
     
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:41: error: conflicting declaration 'long long unsigned int t'
    5 |        string t; unsigned long long int t;
      |                                         ^
a.cc:5:15: note: previous declaration as 'std::string t'
    5 |        string t; unsigned long long int t;
      |               ^
a.cc:15:8: error: 'a' was not declared in this scope
   15 |        a=a+((int)t[i]);
      |        ^
a.cc:17:12: error: 'a' was not declared in this scope
   17 |         if(a%9==0)
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |  sum += atoi(s);
      |              ^
      |              |
      |              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

import java.util.Scanner;

public class DivisibleBy9 {
   public static void main(String args[]) {
      Scanner sc = new Scanner(System.in);
      
      String num = sc.nextLine();
      int digitSum = 0;
      for(int i = 0; i<num.length(); i++){
         digitSum = digitSum + num.charAt(i)-'0';
      }
      if(digitSum % 9 == 0){
         System.out.println("Yes");
      } else {
         System.out.println("No");
      }
   }
}

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

//  main.cpp
//  CppTest
#include <stdio.h>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>

using namespace std;

int main(int argc, const char * argv[]) {
    
    // cinを高速にするためのおまじない
    cin.tie(0);
    ios::sync_with_stdio(false);

    /////////////////////
    // Write code below /
    char Num[100];
    int keep=0;
    int count;
    int N;
    long int len;
    cin >> Num;
    len = strlen(Num);
    for(count = 0; count<len; count++){
        N = (int)Num[count];
        keep = keep + N;
        N = N/10;
    }
    keep = keep%9;
    if(keep != 0){
        cout << "No" << endl;
    }else{
        cout << "Yes" << endl;
    }
    
    
    
    /////////////////////


    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:26:11: error: 'strlen' was not declared in this scope
   26 |     len = strlen(Num);
      |           ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <algorithm>
  +++ |+#include <cstring>
    9 |
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    9 |     int length=n.length;
      |                  ^~~~~~
Language: C++

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

int main(){
    string n;
    int ans=0;
    cin >> n;
    int length=n.lenth;
    for(int i=0;i<length;i++){
        ans+=atoi(n.c_str());
    }
    if(ans%9==0){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenth'; did you mean 'length'?
    9 |     int length=n.lenth;
      |                  ^~~~~
      |                  length
Language: C++

#include<bits/stdc++.h>
using namespace std;
int s(string  m)
{
long long int s1,d,i=0;
 while(m[i])
 {

   s1=s1+(int)string[i]-48;
 i++;
 }
 return s1;
}

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


}

Compiler output:
a.cc: In function 'int s(std::string)':
a.cc:9:21: error: expected primary-expression before '[' token
    9 |    s1=s1+(int)string[i]-48;
      |                     ^
a.cc: At global scope:
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   15 | main()
      | ^~~~
Language: C++

int main() {

int N;
cin >> N;
String str = N.toSting();
int len = str.getLength();
  
vector<int> A(N);
int sum = 0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
    4 | cin >> N;
      | ^~~
a.cc:5:1: error: 'String' was not declared in this scope
    5 | String str = N.toSting();
      | ^~~~~~
a.cc:6:11: error: 'str' was not declared in this scope; did you mean 'std'?
    6 | int len = str.getLength();
      |           ^~~
      |           std
a.cc:8:1: error: 'vector' was not declared in this scope
    8 | vector<int> A(N);
      | ^~~~~~
a.cc:8:8: error: expected primary-expression before 'int'
    8 | vector<int> A(N);
      |        ^~~
a.cc:12:10: error: 'A' was not declared in this scope
   12 |   sum += A.at(N);
      |          ^
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:14:22: error: 'endl' was not declared in this scope
   14 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "No" << endl;
      |     ^~~~
a.cc:18:21: error: 'endl' was not declared in this scope
   18 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'unint128_t' was not declared in this scope; did you mean 'uint8_t'?
    4 |   unint128_t n;
      |   ^~~~~~~~~~
      |   uint8_t
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
a.cc:6:13: error: expected ';' before 'x'
    6 |   unint128_t x=0;
      |             ^~
      |             ;
a.cc:8:5: error: 'x' was not declared in this scope
    8 |     x+=n%10;
      |     ^
a.cc:11:6: error: 'x' was not declared in this scope
   11 |   if(x%9==0){cout<<"Yes"<<endl;}
      |      ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: lvalue required as left operand of assignment
    7 |   if(0 = n % 9)cout << "Yes" <<endl;
      |      ^
Language: C++

#include <vector>
#include <unordered_set>
#include <sstream>
#include <iostream> 
 
 
using namespace std;
 
 
int main() {
	int n;
	cin >> n;
    
    int digit_sum(int n){
    if(n < 10)  return n;
    return digit_sum(n/10) + n%10;
    }

		if (digit_sum(n/10) + n%10 % 9 == 0) {
				cout << Yes << endl;
		} else {
				cout << No  << endl;
		}
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: a function-definition is not allowed here before '{' token
   14 |     int digit_sum(int n){
      |                         ^
a.cc:19:21: error: 'digit_sum' was not declared in this scope
   19 |                 if (digit_sum(n/10) + n%10 % 9 == 0) {
      |                     ^~~~~~~~~
a.cc:20:41: error: 'Yes' was not declared in this scope
   20 |                                 cout << Yes << endl;
      |                                         ^~~
a.cc:22:41: error: 'No' was not declared in this scope
   22 |                                 cout << No  << endl;
      |                                         ^~
Language: C++

#include<iostream>
using namespace std;
bool divbynine(n)
{int n;
 cin>>n;
  if(n==0 || n==9)
  {
    return true;
  }
  else if(n<9)
  {
    return false;
  }
 else
 {
 return divbynine((int)(n >> 3) - (int)(n & 7));
 }

}
int main()
{
  int n;
  cin>>n;
  if(divbynine(n))
  {
    std::cout<<"Yes"<<endl;
  }
  else
  {
    std::cout<<"No"<<endl;
  }
  return 0;
}

Compiler output:
a.cc:3:16: error: 'n' was not declared in this scope
    3 | bool divbynine(n)
      |                ^
a.cc: In function 'int main()':
a.cc:24:15: error: 'divbynine' cannot be used as a function
   24 |   if(divbynine(n))
      |      ~~~~~~~~~^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
     int t,a=0;
    while(t>0)
    {
       a=a+(t%10);
        t=t/10;
      
      
      
      
      
        
    }
        if(a%9==0)
        {
            cout << "Yes" << "\n" ' 
        }
   else
   {
     cout << "No" << "\n" ; 
   }
     
}

Compiler output:
a.cc:19:35: warning: missing terminating ' character
   19 |             cout << "Yes" << "\n" '
      |                                   ^
a.cc:19:35: error: missing terminating ' character
   19 |             cout << "Yes" << "\n" '
      |                                   ^ 
a.cc: In function 'int main()':
a.cc:19:34: error: expected ';' before '}' token
   19 |             cout << "Yes" << "\n" '
      |                                  ^
      |                                  ;
   20 |         }
      |         ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
    4 |   int128_t n;
      |   ^~~~~~~~
      |   int8_t
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
a.cc:6:11: error: expected ';' before 'x'
    6 |   int128_t x=0;
      |           ^~
      |           ;
a.cc:8:5: error: 'x' was not declared in this scope
    8 |     x+=n%10;
      |     ^
a.cc:11:6: error: 'x' was not declared in this scope
   11 |   if(x%9==0){cout<<"Yes"<<endl;}
      |      ^
Language: C++

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

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ')' before '!' token
    7 |   while(lli ! = 0){
      |        ~   ^~
      |            )
a.cc:7:15: error: expected primary-expression before '=' token
    7 |   while(lli ! = 0){
      |               ^
Language: C++

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

Compiler output:
a.cc:19:35: warning: missing terminating ' character
   19 |             cout << "Yes" << "\n" '
      |                                   ^
a.cc:19:35: error: missing terminating ' character
   19 |             cout << "Yes" << "\n" '
      |                                   ^ 
a.cc: In function 'int main()':
a.cc:8:8: error: 'a' was not declared in this scope
    8 |        a=a+(t%10);
      |        ^
a.cc:17:12: error: 'a' was not declared in this scope
   17 |         if(a%9==0)
      |            ^
a.cc:19:34: error: expected ';' before '}' token
   19 |             cout << "Yes" << "\n" '
      |                                  ^
      |                                  ;
   20 |         }
      |         ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cpp_int' was not declared in this scope; did you mean 'u_int'?
    4 |   cpp_int n;
      |   ^~~~~~~
      |   u_int
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{long long n,x,t,y;
 string s;
 cin>>s;n=s.length();y=0;
for(i=0;i<n;i++)
{y=y+s[i]-'0';}
 if(y%9==0)cout<<"YES";
 else cout<<"NO";
return 0;}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: lvalue required as left operand of assignment
    7 |   if(n % 9 = 0)cout << "Yes" <<endl;
      |      ~~^~~
Language: Java

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

Compiler output:
Main.java:8: error: ')' expected
      ans=(ans+Integer.parseInt(ss.substring(i,i+1))%9;
                                                      ^
1 error
Language: Java

def digitSum(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)

N = int(input())

sum = digitSum(N)

if sum%9==0:
  print("Yes")
else:
  print("No")

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def digitSum(n):
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
def digitSum(n):
              ^
Main.java:1: error: ';' expected
def digitSum(n):
               ^
Main.java:3: error: class, interface, enum, or record expected
    array = list(map(int, s))
                     ^
4 errors
Language: C++

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

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



Compiler output:
a.cc:21:9: error: redefinition of 'int main()'
   21 |     int main()
      |         ^~~~
a.cc:3:13: note: 'int main()' previously defined here
    3 |         int main()
      |             ^~~~
a.cc: In function 'int main()':
a.cc:27:16: error: 's' was not declared in this scope
   27 |       while(i!=s.length())
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string x;
  long long a=0;
  cin>>x;
  for(int i=0;i<x.size();i++){
    a+=x.at(i);
    cout<<x[i]<<endl;
  }
  if(x=="0")
    cout<<"Yes"endl;
  if(a%9==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   12 |     cout<<"Yes"endl;
      |           ^~~~~~~~~
Language: C

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

int main() {
  // int n = 123456789;
  scanf("%d\n", &n);
  if(n==0){
    printf("Yes\n");
    return 0;
  }
  int d = n;
  int len = 1;
  while((d / 10) != 0){
    d = d / 10;
    len++;
  }
  printf("%d\n", len);


  int q = n;
  int sum = 0;
  do {
    sum += q % 10;
    q /= 10;
    printf("now %d\n", sum);
  } while(q);
  printf("%d\n", sum);
  if(!(sum % 9)){
    printf("Yes\n");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:18: error: 'n' undeclared (first use in this function)
    6 |   scanf("%d\n", &n);
      |                  ^
main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main(){
  string x;
  long long a=0;
  cin>>x;
  for(int i=0;i<x.size();i++){
    a+=x.at(i);
    cout<<x[i]<<endl;
  }
  if(x=="0")
    cout<<"Yes"endl;;
  if(a%9==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   12 |     cout<<"Yes"endl;;
      |           ^~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{int n;
 cin>>n;
  if(n==0 || n==9)
  {
    std::cout<<"Yes"<<endl;
  }
  else if(n<9)
  {
    std::cout<<"No"<<endl;
  }
 else
 {
 std::cout<<main((int)(n >> 3) - (int)(n & 7));
 }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: too many arguments to function 'int main()'
   16 |  std::cout<<main((int)(n >> 3) - (int)(n & 7));
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:3:5: note: declared here
    3 | int main()
      |     ^~~~
Language: Java

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

Compiler output:
Main.java:8: error: ')' expected
      ans=(ans+Integer.parseInt(ss.substring(i,i))%9;
                                                    ^
1 error
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;
int s;
char c;
int main () {
  while (cin>>c) 
    s+=(c-'0');
  if (s==0||s%9==0) 
    puts ("Yes");
  else 
    puts ("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'cin' was not declared in this scope
    7 |   while (cin>>c)
      |          ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
Language: Java

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

Compiler output:
Main.java:8: error: ')' expected
      ans=(ans+Integer.parseInt(ss.substring(i,i))%9;
                                                    ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{int n;
 cin>>n;
  if(n==0 || n==9)
  {
    std::cout<<"Yes"<<endl;
  }
  else if(n<9)
  {
    std::cout<<"No"<<endl;
  }
 else
 {
 cout isDivBy9((int)(n >> 3) - (int)(n & 7));
 }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected ';' before 'isDivBy9'
   16 |  cout isDivBy9((int)(n >> 3) - (int)(n & 7));
      |      ^~~~~~~~~
      |      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   11 |     sum=sum+stoi(s[i])-'0';
      |             ~~~~^~~~~~
In file included 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/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()
{
     // freopen("input1.txt","r",stdin);
     // freopen("output1.txt","w",stdout); 
    string S; 
    cin>> S;
    int ans=0;
    for(auto it:S)
        ans=(ans+ it-'0') %9;
    }
    if(ans==0)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}

Compiler output:
a.cc:13:5: error: expected unqualified-id before 'if'
   13 |     if(ans==0)
      |     ^~
a.cc:15:5: error: expected unqualified-id before 'else'
   15 |     else
      |     ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C

#include <stdio.h>
int main(){
  int x;
  int a[];
  scanf("%d",&x);
  int i;
  for(i=0;x>=10;i++)	{
    a[i] = x%10;		
    x=x/10;
  }	
  a[i] = x;	
  x = 0;
  while(i){
    x = x+a[i];
    i--;	
  }
  x = x+a[0];	  
  if (x%9==0){
    printf ("Yes");
  }
  else 
    printf ("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: array size missing in 'a'
    4 |   int a[];
      |       ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'int256_t' was not declared in this scope; did you mean 'int16_t'?
    4 |   int256_t n;
      |   ^~~~~~~~
      |   int16_t
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
    4 |   int128_t n;
      |   ^~~~~~~~
      |   int8_t
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
Language: C++

int main() {
  long long N, sum=0;
  cin >> N;
  ostringstream oss;
  oss << N;
  string num = oss.str();
  string a;
  for(int i=0; i < num.length(); i++) {
    a = num.at(i);
    sum += atoi(a.c_str());
  }
  if (sum % 9 > 0) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N;
      |   ^~~
a.cc:4:3: error: 'ostringstream' was not declared in this scope
    4 |   ostringstream oss;
      |   ^~~~~~~~~~~~~
a.cc:5:3: error: 'oss' was not declared in this scope
    5 |   oss << N;
      |   ^~~
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string num = oss.str();
      |   ^~~~~~
a.cc:7:9: error: expected ';' before 'a'
    7 |   string a;
      |         ^~
      |         ;
a.cc:8:20: error: 'num' was not declared in this scope; did you mean 'sum'?
    8 |   for(int i=0; i < num.length(); i++) {
      |                    ^~~
      |                    sum
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a = num.at(i);
      |     ^
a.cc:10:12: error: 'atoi' was not declared in this scope
   10 |     sum += atoi(a.c_str());
      |            ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << "No" << endl;
      |     ^~~~
a.cc:13:21: error: 'endl' was not declared in this scope
   13 |     cout << "No" << endl;
      |                     ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:15:22: error: 'endl' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |                      ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |     sum=sum+stoi(s[i])-'0';
      |             ~~~~^~~~~~
In file included 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/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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'length' was not declared in this scope
   10 |     for (int i = 0; i < length(N); i++) {
      |                         ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<math.h>
#include<limits>
#include<list>
#include <stdio.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i = 0;i < (n); ++i)
#pragma GCC optimize("Ofast")



int main() {
	string n;
	cin >> n;
	ll count = 0;
	if (n == "0") {
		cout << "Yes" << endl;
		return 0;
	}

	for (int i = 0; i < (ll)(n.size()); i++) {
		if (n.at(i) == '0' || n.at(i) == '9' {
			continue;
		}
		count += n.at(i);
	}
	count %= 9;
	if (count == 0)cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:53: error: expected ';' before '{' token
   27 |                 if (n.at(i) == '0' || n.at(i) == '9' {
      |                                                     ^~
      |                                                     ;
a.cc:30:33: error: expected ')' before ';' token
   30 |                 count += n.at(i);
      |                                 ^
      |                                 )
a.cc:27:20: note: to match this '('
   27 |                 if (n.at(i) == '0' || n.at(i) == '9' {
      |                    ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
#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() {
	ll n;
	//int ans;
	int digit;
	int num1;
	ll sum;
	vector<int> nEachDigit = {};
	cin >> n ;
	for (int i = 200000;i >= 0;i--) {
		digit = (int)pow(10, i);
		if (n / digit >= 1) {
			// 一の位を取り出す
			num1 = (n / digit) % 10;
			nEachDigit.push_back(num1);
		}
	}
	sum = accumulate(nEachDigit.begin(), nEachDigit.end(), 0);
	if (sum % 9 == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	//	cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:30: error: 'pow' was not declared in this scope
   20 |                 digit = (int)pow(10, i);
      |                              ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{int r=0;
  char str[100000];
  gets(str);
  for(int i=0;str[i];i++)
  {
      r=r+str[i]-48;
  }
  if(r%9==0)
  cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
 return 0;
}


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

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

int wa(ll num){
    if(num < 10) return num;
    return wa(num/10) + num%10;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected primary-expression before '=' token
   15 |     while(n>==10){
      |              ^
Language: C++

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

Compiler output:
a.cc: In function 'int div(std::string)':
a.cc:12:8: error: no matching function for call to 'div(char)'
   12 |     div(char(sum));
      |     ~~~^~~~~~~~~~~
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:992:14: note: candidate: 'div_t div(int, int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
/usr/include/stdlib.h:992:14: note:   candidate expects 2 arguments, 1 provided
a.cc:4:5: note: candidate: 'int div(std::string)'
    4 | int div(string s)
      |     ^~~
a.cc:4:16: note:   no known conversion for argument 1 from 'char' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    4 | int div(string s)
      |         ~~~~~~~^
/usr/include/c++/14/cstdlib:219:3: note: candidate: 'lldiv_t __gnu_cxx::div(long long int, long long int)'
  219 |   div(long long __n, long long __d)
      |   ^~~
/usr/include/c++/14/cstdlib:219:3: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cstdlib:181:3: note: candidate: 'ldiv_t std::div(long int, long int)'
  181 |   div(long __i, long __j) _GLIBCXX_NOTHROW { return ldiv(__i, __j); }
      |   ^~~
/usr/include/c++/14/cstdlib:181:3: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

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

#include <bits/stdc++.h> 
#include <boost/multiprecision/cpp_int.hpp> 
using boost::multiprecision::cpp_int; 
using namespace std;


int main()
{

cpp_int n;
cin>>n;

cpp_int r=val%9;

if(r%9==0)
cout<<"Yes\n";  
else
cout<<"No\n";      

return 0;
}

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

#include <bits/stdc++.h>

using namespace std;





int  main() {
    
  string s;
  cin>>s;
  
    unsinged long long sum=0;
    int arr[100005];
  for(int i=0;i<(int)s.length();i++)
  {
      arr[i] = s[i] - '0';
      sum+=arr[i];
  }

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

  
  
    
    return 0;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'unsinged' was not declared in this scope; did you mean 'unsigned'?
   14 |     unsinged long long sum=0;
      |     ^~~~~~~~
      |     unsigned
a.cc:19:7: error: 'sum' was not declared in this scope
   19 |       sum+=arr[i];
      |       ^~~
a.cc:23:6: error: 'sum' was not declared in this scope
   23 |   if(sum == 0)
      |      ^~~
Language: C

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

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