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

#include <bits/stdc++.h>
#define ll long long
using namespace std;
/* vector <vector <ll>> v(2e6);
 vector <bool> vis(2e6,false);
 vector <bool> vis2(2e6,false);
 vector <bool> res(2e6,false);
 long long s=0;
  bool flag=true;
void dfs(int x,int n)
{
      vis[x]=true;
      if(x==n-1)
        s++;
    for(int i=0;i<v[x].size()&&flag;i++)
        {
            if(!vis[v[x][i]])
           {
               dfs(v[x][i],n);
           }
           else if(v[x][i]==n-1)
            s++;
        }
}
*/

int main()
{
 ll t,n,m,k,x,l,r,i,sum=0,y,sx,sy,ex,ey,ans=0;
string s;
cin>>s;
k=0;
 while (k<s.size()
   sum+=s[k++]-'0';
if(sum%9==0)
    cout<<"Yes\n";
else
    cout<<"No\n";
}




Compiler output:
a.cc: In function 'int main()':
a.cc:33:19: error: expected ')' before 'sum'
   33 |  while (k<s.size()
      |        ~          ^
      |                   )
   34 |    sum+=s[k++]-'0';
      |    ~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
#define all(i) i.begin(),i.end()
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


int main() {
  string s;
  cin>>s;
  ll ans=0;
  for(int i=0;i<s.size();i++){
    string b=s.at(i);
    ll a=stoll(b);
    ans+=a;
  }
  if(ans%9==0){
    cout<<"Yes"<<endl;
  }
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:18: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   24 |     string b=s.at(i);
      |              ~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
#define all(i) i.begin(),i.end()
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   24 |     string b=s[i];
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
#define all(i) i.begin(),i.end()
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: no matching function for call to 'stoll(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   24 |     ll a=stoll(s.at(i));
      |          ~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
/usr/include/c++/14/bits/basic_string.h:4180:23: 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>&'}
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |         ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4447:3: note: candidate: 'long long int std::__cxx11::stoll(const std::wstring&, std::size_t*, int)'
 4447 |   stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
/usr/include/c++/14/bits/basic_string.h:4447:24: 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>&'}
 4447 |   stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |         ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define pi 3.14159265359
#define all(i) i.begin(),i.end()
using namespace std;
const long long INF=1e9+7;
const string alp="abcdefghijklmnopqrstuvwxyz"; //26
const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
//const ll MOD=998244353LL;
//const ll MOD=1777777777LL;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: no matching function for call to 'stoll(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   24 |     ll a=stoll(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:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
/usr/include/c++/14/bits/basic_string.h:4180:23: 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>&'}
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |         ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4447:3: note: candidate: 'long long int std::__cxx11::stoll(const std::wstring&, std::size_t*, int)'
 4447 |   stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
/usr/include/c++/14/bits/basic_string.h:4447:24: 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>&'}
 4447 |   stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |         ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main() {
    char str[200010];
    cin >> str;

    int len = strlen(str);

    ll sum = 0;
    for (int i = 0; i < len; i++) {
        sum += str[i] - '0';
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll sum = 0;
      |     ^~
a.cc:12:9: error: 'sum' was not declared in this scope
   12 |         sum += str[i] - '0';
      |         ^~~
a.cc:15:9: error: 'sum' was not declared in this scope
   15 |     if (sum % 9 == 0) {
      |         ^~~
Language: Java

import java.util.*;
class Main{
 public static void main(String args[]){
  Scanner scan=new Scanner(System.in);
   String m=scan.next();
   int sum=0;
   for(int i=0;i<m.length();++i){
     sum+=(int)m.charAt(i)-'48';
   }
   if(sum%9==0){
     System.out.print("YES");
 }
   else
     System.out.print("NO");
 }   
}

Compiler output:
Main.java:8: error: unclosed character literal
     sum+=(int)m.charAt(i)-'48';
                           ^
Main.java:8: error: unclosed character literal
     sum+=(int)m.charAt(i)-'48';
                              ^
2 errors
Language: C++

/******************************************************************************
 
                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
 
*******************************************************************************/
 
#include <iostream>
#include <math.h>
using namespace std;
int n;
 int main()
{
    cin >> n
    if(n%9 ==0) {
        cout << "yes";
    }
    else {
        cout << "no";
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before 'if'
   15 |     cin >> n
      |             ^
      |             ;
   16 |     if(n%9 ==0) {
      |     ~~       
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else {
      |     ^~~~
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include <math.h>
using namespace std;
int n;
 int main()
{
    cin >> n
    if(n%9 ==0) {
        cout << "YES";
    }
    else {
        cout << "NO";
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before 'if'
   15 |     cin >> n
      |             ^
      |             ;
   16 |     if(n%9 ==0) {
      |     ~~       
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else {
      |     ^~~~
Language: C

#include<stdio.h>

int main(void) {

long int N,sum,dig;

for (int i = 0; i < 50; i++) {
  /* code */

scanf("%ld", &N);
if(N>=0){
while(N){
  dig = N % 10;
  sum = sum + dig;
  N = N / 10;
  break;
}}

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


Compiler output:
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C++

#include<iostream>
 
using namespace std;
 
int main()
{
  char N[200000];  
  cin>>N;
  int sum=0;
  
  for(int loop=0;loop<200000;loop++)
  {
    sum+=atoi((const char)N[loop]);
  }
 
  if(!sum)
    cout<<"No"<<endl;
  else if(sum%9==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |     sum+=atoi((const char)N[loop]);
      |               ^~~~~~~~~~~~~~~~~~~
      |               |
      |               char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
 
using namespace std;
 
int main()
{
  char N[200000];  
  cin>>N;
  int sum=0;
  
  for(int loop=0;loop<200000;loop++)
  {
    sum+=atoi(N[loop]);
  }
 
  if(!sum)
    cout<<"No"<<endl;
  else if(sum%9==0)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |     sum+=atoi(N[loop]);
      |               ~~~~~~^
      |                     |
      |                     char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

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

using namespace std;

int main()
{
  long int N;
  cin>>N;
  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; 
}

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

#include<iostream>
#include<string>
using namespace std;
int main(){
string 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:7: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    7 |   if(N%9==0){cout<<"Yes"<<endl;}
      |      ~^~
      |      | |
      |      | int
      |      std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

int main(){
  string s;
  cin >> s;
  int n = s.size(), total=0;
  rep(i,n){
    total += s[i];
  }
  cout << if(total%9 == 0)?"Yes":"No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before 'if'
   12 |   cout << if(total%9 == 0)?"Yes":"No" << endl;
      |           ^~
Language: C++

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

int main() {
  char n[20010];
  cin >> n;
  int sum=0;
  for(int i=0;i<n.length();i++)
    sum += n(i);
  if(sum%9==0)
    cout << "Yes";
  else
    cout << "No";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: request for member 'length' in 'n', which is of non-class type 'char [20010]'
    9 |   for(int i=0;i<n.length();i++)
      |                   ^~~~~~
a.cc:10:13: error: 'n' cannot be used as a function
   10 |     sum += n(i);
      |            ~^~~
Language: C

#include <stdio.h>
 
int main(void) {
  char n[1000000];
  int i=0;
  int sum = 0;
  
  fgets(n,sizeof(n),stdin);
  while (n[i] != '\0') {
    if ('0'<=n[i] && n[i]<='9') {
      sum += n[i] - '0';
    }
    i++;
  }

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: C

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

int main(void) {
  char n[30];
  int i=0;
  int sum = 0;
  
  scanf("%s", n);
  while (n[i] != '\0') {
    if ('0'<=n[i] && n[i]<='9') {
      sum += atoi(n[i]);
    }
  }
  printf("%s", sum%9==0 ? "Yes", "No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:14: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   12 |       sum += atoi(n[i]);
      |              ^~~~
main.c:15:38: error: expected ':' before ')' token
   15 |   printf("%s", sum%9==0 ? "Yes", "No");
      |                                      ^
      |                                      :
Language: C++


#include <iostream>
#include <algorithm>
#include <string>
#include <functional>
#include <tuple>
#include <vector>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
   15 |     total = total%9 + (s[i] - "0");
Language: C++


#include <iostream>
#include <algorithm>
#include <string>
#include <functional>
#include <tuple>
#include <vector>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: request for member 'size' in 's', which is of non-class type 'int'
   14 |   for (int i=0; i<s.size(); i++){
      |                     ^~~~
a.cc:15:25: error: invalid types 'int[int]' for array subscript
   15 |     total = total%9 + (s[i] - "0");
      |                         ^
Language: C++


#include <iostream>
#include <algorithm>
#include <string>
#include <functional>
#include <tuple>
#include <vector>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: request for member 'size' in 's', which is of non-class type 'int'
   14 |   for (int i=0; i<s.size(); i++){
      |                     ^~~~
a.cc:15:25: error: invalid types 'int[int]' for array subscript
   15 |     total = total%9 + (s[i] - "0");
      |                         ^
a.cc:17:29: error: 'Yes' was not declared in this scope
   17 |   if (total%9 == 0) cout << Yes << endl;
      |                             ^~~
a.cc:18:16: error: 'No' was not declared in this scope
   18 |   else cout << No << endl;
      |                ^~
Language: C++

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

int main()
{
    string n;
    long long sum=0;
    cin >> n;
    for(int i=0; i<n.size(); i++)
        sum=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:28: error: expected ';' before 'else'
   12 |         cout << "Yes"<<endl
      |                            ^
      |                            ;
   13 |     else
      |     ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   11 |     if(n % 9 == 0){
      |        ~ ^ ~
      |        |   |
      |        |   int
      |        std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  int sum = 0;
  for(int i = 0;i < n.size();i++){
    sum += n[i];
  }
  if(sum % 9 == 0){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: request for member 'size' in 'n', which is of non-class type 'int'
    7 |   for(int i = 0;i < n.size();i++){
      |                       ^~~~
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |     sum += n[i];
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector<int> N(200010);
  int S;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'sum' was not declared in this scope
   10 |     sum += N.size() - 0;
      |     ^~~
Language: C++

#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#define F first;
#define S second;
#define PB(x) push_back(x);
#define MP make_pair;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
template <typename T>
T max(T x, T y)
{
    return (x > y) ? x : y;
}
template <typename T>
T min(T x, T y)
{
    return (x < y) ? x : y;
}
const int M = 1e9 + 7;
bool isMulOf9(int n)
{
    // Base cases
    if (n == 0 || n == 9)
        return true;
    if (n < 9)
        return false;
 
    // if the number is greater than 9, then do this 
    return isMulOf9((int)(n>>3) - (int)(n&7));
}
void solve()
{
    int N;
    cin >> N;
    if(isMulof9(N) % 9 == 0)
        cout << "YES" << endl;
    else
    {
        cout << "NO" << endl;
    }
    
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
    
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:40:8: error: 'isMulof9' was not declared in this scope; did you mean 'isMulOf9'?
   40 |     if(isMulof9(N) % 9 == 0)
      |        ^~~~~~~~
      |        isMulOf9
Language: C++

#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#define F first;
#define S second;
#define PB(x) push_back(x);
#define MP make_pair;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
template <typename T>
T max(T x, T y)
{
    return (x > y) ? x : y;
}
template <typename T>
T min(T x, T y)
{
    return (x < y) ? x : y;
}
const int M = 1e9 + 7;
bool solve2(int N)
{
    long long N;
    cin >> N;
    // Base cases 
    if (N == 0 || N == 9) 
        return true; 
    if (N < 9) 
        return false; 
  
    // If n is greater than 9, then recur for [floor(n/9) - n%8] 
    return solve2((long long)(N >> 3) - (long long)(N & 7));
    
}
int solve()
{
    int N;
    cin >> N;
    return N;
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    if(solve2(solve()))
        cout << "YES" << endl;
    else
    {
        cout << "NO" << endl;
    }
    
}

Compiler output:
a.cc: In function 'bool solve2(int)':
a.cc:27:15: error: declaration of 'long long int N' shadows a parameter
   27 |     long long N;
      |               ^
a.cc:25:17: note: 'int N' previously declared here
   25 | bool solve2(int N)
      |             ~~~~^
Language: C++

#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#define F first;
#define S second;
#define PB(x) push_back(x);
#define MP make_pair;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
template <typename T>
T max(T x, T y)
{
    return (x > y) ? x : y;
}
template <typename T>
T min(T x, T y)
{
    return (x < y) ? x : y;
}
const int M = 1e9 + 7;
bool solve()
{
    long long N;
    cin >> N;
    // Base cases 
    if (N == 0 || N == 9) 
        return true; 
    if (N < 9) 
        return false; 
  
    // If n is greater than 9, then recur for [floor(n/9) - n%8] 
    return solve((int)(N >> 3) - (int)(N & 7));
    
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    if(solve())
        cout << "YES" << endl;
    else
    {
        cout << "NO" << endl;
    }
    
}

Compiler output:
a.cc: In function 'bool solve()':
a.cc:36:17: error: too many arguments to function 'bool solve()'
   36 |     return solve((int)(N >> 3) - (int)(N & 7));
      |            ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:25:6: note: declared here
   25 | bool solve()
      |      ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#define F first;
#define S second;
#define PB(x) push_back(x);
#define MP make_pair;
#define FOR(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
template <typename T>
T max(T x, T y)
{
    return (x > y) ? x : y;
}
template <typename T>
T min(T x, T y)
{
    return (x < y) ? x : y;
}
const int M = 1e9 + 7;
bool solve()
{
    long long N;
    cin >> N;
    // Base cases 
    if (n == 0 || n == 9) 
        return true; 
    if (n < 9) 
        return false; 
  
    // If n is greater than 9, then recur for [floor(n/9) - n%8] 
    return solve((int)(n >> 3) - (int)(n & 7));
    
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    if(solve())
        cout << "YES" << endl;
    else
    {
        cout << "NO" << endl;
    }
    
}

Compiler output:
a.cc: In function 'bool solve()':
a.cc:30:9: error: 'n' was not declared in this scope
   30 |     if (n == 0 || n == 9)
      |         ^
a.cc:32:9: error: 'n' was not declared in this scope
   32 |     if (n < 9)
      |         ^
a.cc:36:24: error: 'n' was not declared in this scope
   36 |     return solve((int)(n >> 3) - (int)(n & 7));
      |                        ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
    char a[200000];
    cin >> a;
    int sum = 0;
    for(int i=0; i <= 200000; i++){
        if(a[i] == "\n")break;
        sum += (int)a[i];
    }
    if(sum%9==0)cout << "Yes";
    else{
        cout << "No";
    }
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: request for member 'size' in 'a', which is of non-class type 'char [200000]'
    8 |     for(int i=0; i <= (a.size()); i++){
      |                          ^~~~
Language: C++

31415926535897932384626433832795028841971693993751058209749445923078164062862089986280

Compiler output:
a.cc:1:1: warning: integer constant is too large for its type
    1 | 31415926535897932384626433832795028841971693993751058209749445923078164062862089986280
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before numeric constant
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
 
#define SORT(c) sort((c).begin(), (c).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
#define ANS(ans) cout << (ans) << endl;
#define UNIQUE(v) (v).erase(unique((v).begin(), (v).end()), (v).end());
typedef vector<int> VI;
typedef pair<int, int> P;
 
// repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
#define REP(i, n) for (long long i = 0; i < (n); ++i)
int main()
{
  string num;
  cin >> num;
  int sum = 0;
  REP(i,num.size())
  {
    sum=sum+num[i]-'0';
  }
  if(sum%9==0)
  {
    ANS("Yes");
  }
  else
  {
    Ans("No");
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: 'Ans' was not declared in this scope; did you mean 'ANS'?
   31 |     Ans("No");
      |     ^~~
      |     ANS
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <set>
#include <map>

using namespace std;

#define pb push_back
#define mp make_pair
#define x first
#define y second

typedef long long ll;

const ll INF = 1e9+5;
const ll MOD = 1e9+7;

int main() {
	string s;
  	cin >>s;
  	int cnt = 0;
  	for (int i=0 ; i<s.size() ; i++) {
     	cnt += (s-'0');
      	cnt %= 9;
    }
  	if (cnt) cout <<"No\n";
  	else cout <<"Yes\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   26 |         cnt += (s-'0');
      |                 ~^~~~
      |                 | |
      |                 | char
      |                 std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 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/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:26:19: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   26 |         cnt += (s-'0');
      |                   ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:26:19: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   26 |         cnt += (s-'0');
      |                   ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'logn' was not declared in this scope; did you mean 'long'?
    6 |     for(logn long i=0;i<size;i++)
      |         ^~~~
      |         long
a.cc:6:23: error: 'i' was not declared in this scope
    6 |     for(logn long i=0;i<size;i++)
      |                       ^
Language: C++

#include <iostream>
using namespace std;
int digit(int N){

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

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

#include <stdio.h>


int main(void) {
    long int N;
    int judge = 0;
    scanf("%d", &d);
    while (1) {
        judge = judge * N % 10;
        N = N / 10;
        if (N == 0) {
            break;
        }
    }
    if (judge % 9 == 0) {
        printf("Yes");
    }
    else {
        printf("No");
    }
}

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

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

int main()
{
    int sum = 0;
    int n;
    cin >> n;
    string s = itos(n);
    int x = s.size();
    for(int i=0;i<x;i++){
        int f = stoi(s[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'itos' was not declared in this scope
   11 |     string s = itos(n);
      |                ^~~~
a.cc:14:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |         int f = stoi(s[i]);
      |                 ~~~~^~~~~~
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 <vector>
#include <string>
using namespace std;

int main()
{
    int sum = 0;
    /*0桁 ~ 199999桁*/
    string n;
    getline(cin, n);
    int x = n.size();
    for(int i=0;i<x;i++){
        int f = stoi(n[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |         int f = stoi(n[i]);
      |                 ~~~~^~~~~~
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 <vector>
#include <string>
using namespace std;

int main()
{
    int sum = 0;
    /*0桁 ~ 199999桁*/
    string n;
    cin >> n;
    int x = n.size();
    for(int i=0;i<x;i++){
        int f = stoi(n[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |         int f = stoi(n[i]);
      |                 ~~~~^~~~~~
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 <vector>
#include <string>
using namespace std;

int main()
{
    int sum = 0;
    /*0桁 ~ 199999桁*/
    string n;
    cin >> n;
    int x = n.length();
    for(int i=0;i<x;i++){
        int f = stoi(n[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |         int f = stoi(n[i]);
      |                 ~~~~^~~~~~
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 <vector>
#include <string>
using namespace std;

int main()
{
    int sum = 0;
    int a[200000];
    /*0桁 ~ 199999桁*/
    string n;
    cin >> n;
    int x = n.length();
    for(int i=0;i<x;i++){
        int f = stoi(n[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   15 |         int f = stoi(n[i]);
      |                 ~~~~^~~~~~
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 <vector>
#include <string>
using namespace std;

int main()
{
    int sum = 0;
    int a[200000];
    /*0桁 ~ 199999桁*/
    string n;
    cin >> n;
    int x = n.length();
    for(int i=0;i<x;i++){
        int f = stoi(n[i]);
        sum += f;
    }
    if(sum % 9 == 0){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   15 |         int f = stoi(n[i]);
      |                 ~~~~^~~~~~
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)
      |        ~~~~~~~~~~~~~~~^~~~~