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

#include <iostream>
using namespace std;

// 各桁の和を計算する関数
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

int main() {
  int N;
  cin >> N ;
  int total = 0;
  for (int i = 1; i <= N; ++i) {
    int sum = findSumOfDigits(i); // i の各桁の和
      total += i;
    }
  }
  
  if(total % 9 == 0) cout << 'Yes' << endl;
  else cout << 'No' << endl;
}

Compiler output:
a.cc:24:30: warning: multi-character character constant [-Wmultichar]
   24 |   if(total % 9 == 0) cout << 'Yes' << endl;
      |                              ^~~~~
a.cc:25:16: warning: multi-character character constant [-Wmultichar]
   25 |   else cout << 'No' << endl;
      |                ^~~~
a.cc:24:3: error: expected unqualified-id before 'if'
   24 |   if(total % 9 == 0) cout << 'Yes' << endl;
      |   ^~
a.cc:25:3: error: expected unqualified-id before 'else'
   25 |   else cout << 'No' << endl;
      |   ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: two or more data types in declaration of 'n'
    6 |   double double n;
      |   ^~~~~~
a.cc:8:8: error: 'n' was not declared in this scope
    8 |   cin>>n;
      |        ^
Language: C

#include<stdio.h>
int main(void){
  int x;
  scanf("%d",&x);
  if(x%9==0){
    printf("Yes");
  }
  else{
    printf("No");
  }

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

n=input()
l=[] 
for i in range(len(str(n))): 
  l.append(int(n[i])) 
if((sum(l)%9)==0): 
  print("Yes") 
else: 
  print("No") 
  


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=input()
      | ^
Language: C

#include <stdio.h>
 
int main()
{
 
  double num;
 
  scanf("%f", &num);
  
  if(num % 9){ 
    puts("No\n");
  }else{
    puts("Yes\n");
  }
    
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:10: error: invalid operands to binary % (have 'double' and 'int')
   10 |   if(num % 9){
      |          ^
Language: C

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

int main(){
  char s[200000];
  scanf("%s",s);
  
  long long ans=0;
  
  int n[200000];
  for(int i=1;i<=200000;i++){
    if(s[i]=<'0')n[i]=0;
    if(s[i]=='1')n[i]=1;
    if(s[i]=='2')n[i]=2;
    if(s[i]=='3')n[i]=3;
    if(s[i]=='4')n[i]=4;
    if(s[i]=='5')n[i]=5;
    if(s[i]=='6')n[i]=6;
    if(s[i]=='7')n[i]=7;
    if(s[i]=='8')n[i]=8;
    if(s[i]=>'9')n[i]=9;
  }
  
  for(int i=0;i<200000;i++){
    ans+=n[i];
  }
  
  if(ans%9==0){printf("Yes");return 0;}
  
  printf("No");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:13: error: expected expression before '<' token
   12 |     if(s[i]=<'0')n[i]=0;
      |             ^
main.c:21:13: error: expected expression before '>' token
   21 |     if(s[i]=>'9')n[i]=9;
      |             ^
Language: C++

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

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


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

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

bool isDivBy9(long long n) 
{ 
   
    if (n == 0 || n == 9) 
        return true; 
    if (n < 9) 
        return false; 
  
   
    return isDivBy9((long long)(n >> 3) - (int)(n & 7)); 
} 

int main() 
{ long long n;
 cin>>n;
 if(isDivBy9(n)){
   cout<<"Yes";}
   else
      cout<<"No"
 
    
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ';' before 'return'
   22 |       cout<<"No"
      |                 ^
      |                 ;
......
   25 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int k;
  k = 200000;
  int i;
  i = pow(10, k);
  int A;
  A = 0;
  while (k>=0) {
    A = A + ( N / i );
    N = N % i;
    k = k - 1;
    i = pow(10, k)
  }
  if ( A % 9 == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before '}' token
   17 |     i = pow(10, k)
      |                   ^
      |                   ;
   18 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc:20:3: error: expected unqualified-id before 'return'
   20 |   return(0);
      |   ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
    int N;
    // 整数の入力
    scanf("%d", &N);
  	int sum=0;
  	while (N>=1){
      int a= N%10;
      sum = sum+a;
      N = N/10
    if (sum/9==0){
      printf("Yes");}
   	else {
      printf("No")}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: expected ';' before 'if'
   11 |       N = N/10
      |               ^
      |               ;
   12 |     if (sum/9==0){
      |     ~~         
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
 	string s;
  cin>>s;
  int sum=0;
  if(string.size()>pow(10,8)){
    for(int i=0;i<10000000;i++){
      sum += int(s[i]);
      if(sum%9 !=0){
        cout<<"No"<<endl
        return 0;
      }
    }
  }
  for(int i=0;i<s.size();i++){
      sum += int(s[i]);
      if(sum%9 !=0){
        cout<<"No"<<endl
        return 0;
      }
  }
  cout<<"Yes"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected unqualified-id before '.' token
    9 |   if(string.size()>pow(10,8)){
      |            ^
a.cc:13:25: error: expected ';' before 'return'
   13 |         cout<<"No"<<endl
      |                         ^
      |                         ;
   14 |         return 0;
      |         ~~~~~~           
a.cc:21:25: error: expected ';' before 'return'
   21 |         cout<<"No"<<endl
      |                         ^
      |                         ;
   22 |         return 0;
      |         ~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:9:2: error: lvalue required as left operand of assignment
    9 | c+=a[i];
      |  ^~
main.c:11:4: error: 'i' undeclared (first use in this function)
   11 | if(i%9==0)printf("Yes");
      |    ^
main.c:11:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

Compiler output:
a.cc: In function 'int digit(int)':
a.cc:7:6: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    7 |      tmp{};
      |      ^~~
      |      tm
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'long long' specified with 'float'
    5 |   long long float n,sum=0, rem;
      |        ^~~~
a.cc:5:8: error: 'long long' specified with 'float'
a.cc:5:8: error: 'long long' specified with 'float'
a.cc:9:10: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    9 |     rem=n%10;
      |         ~^~~
      |         | |
      |         | int
      |         float
a.cc:13:9: error: invalid operands of types 'float' and 'int' to binary 'operator%'
   13 |   if(sum%9==0)
      |      ~~~^~
      |      |   |
      |      |   int
      |      float
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
    lli N; cin>>N;
    int rem,s=0;
    int i;
    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:13:10: error: 'n' was not declared in this scope
   13 |     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 <iostream>
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;

int main()
{
  ll n,sum=0; cin>>ll;
  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: In function 'int main()':
a.cc:8:22: error: expected primary-expression before ';' token
    8 |   ll n,sum=0; cin>>ll;
      |                      ^
Language: C++

#include<iostream>
#include<math>
#include<string>
using namespace std;
int main(){
 	string s;
  cin>>s;
  int sum=0;
  if(string.size()>pow(10,8)){
    for(int i=0;i<10000000;i++){
      sum += int(s[i]);
      if(sum%9 !=0){
        cout<<"No"<<endl
        return 0;
      }
    }
  }
  for(int i=0;i<s.size();i++){
      sum += int(s[i]);
      if(sum%9 !=0){
        cout<<"No"<<endl
        return 0;
      }
  }
  cout<<"Yes"<<endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  int a = 0;
  for(int i=0 ; i < N; i++){
    a += N.at(i)}
  cout << a << endl;
}

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

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

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


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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: redeclaration of 'std::string str'
   11 | string str = ss.str();
      |        ^~~
a.cc:7:30: note: 'std::string str' previously declared here
    7 |                       string str= to_string(n);
      |                              ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'strint' was not declared in this scope; did you mean 'strcat'?
    7 |   strint n = N;
      |   ^~~~~~
      |   strcat
a.cc:11:23: error: 'n' was not declared in this scope
   11 |   for (int i = 0; i < n.size(); i++){
      |                       ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:9:2: error: lvalue required as left operand of assignment
    9 | c+=a[i];
      |  ^~
main.c:11:4: error: 'i' undeclared (first use in this function)
   11 | if(i%9==0)printf("Yes");
      |    ^
main.c:11:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<map>
#include<algorithm>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using namespace boost::multiprecision;

int check(int128_t n)
{
 	int128_t  sum = 0;

	while(n > 0){
		sum += n%10;
		n /= 10;
	 // cout << sum << endl;
	}
	return sum;
}

int main()
{
	 int128_t n;

	cin >> n;

	// cout << n << endl;
	 int128_t total = check(n);

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

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

[18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
    string s;
    cin>>s;
    vector<ll int>v;
    for(ll int i=0; i<s.size(); i++){
        v.push_back(s[i]-'0');
    }
    ll int x=0;
    for( ll int i=0; i<v.size(); i++)
    x=x+v[i];
    if(x%9==0)
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;
    return 0;
}

Compiler output:
a.cc:1:12: error: invalid digit "8" in octal constant
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      |            ^~
a.cc:1:34: error: stray '#' in program
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      |                                  ^
a.cc:1:1: error: expected unqualified-id before '[' token
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string s;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>s;
      |     ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;
      |          ^
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<ll int>v;
      |     ^~~~~~
a.cc:3:12: error: expected primary-expression before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:7:12: note: in expansion of macro 'll'
    7 |     vector<ll int>v;
      |            ^~
a.cc:9:9: error: 'v' was not declared in this scope
    9 |         v.push_back(s[i]-'0');
      |         ^
a.cc:12:24: error: 'v' was not declared in this scope
   12 |     for( ll int i=0; i<v.size(); i++)
      |                        ^
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:15:18: error: 'endl' was not declared in this scope
   15 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope
   17 |     cout<<"No"<<endl;
      |                 ^~~~
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i,a,b) for(int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sz(s) int(s.size())
#define ENDL '\n'
using namespace std;
typedef long double ld;
typedef long long lli;
typedef pair<lli,lli> ii;
typedef vector<lli> vi;
#define deb(x) cout << #x": " << (x) << endl;

int main(){ _
  string n;
  cin >> n;
  lli c = 0;
  fore (i,0,sz(n)){
    c+=n[i];
  }
  lli a = c / 9;
  if ((a * 9) == c){
    cout << "Yes" << ENDL;
  }
  else{
    cout << "No" << ENDL;
  }
  return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C

int main(void){
int a[200000];
int b,c;
scanf("%d",b);
for(int i=0;i<9;i++){
a[i]=b%10;
b=b/10*
c+=a[I];
}
if(i%9==0)printf("Yes");
else printf("No");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 | scanf("%d",b);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 | scanf("%d",b);
      | ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:6: error: 'I' undeclared (first use in this function)
    8 | c+=a[I];
      |      ^
main.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:4: error: 'i' undeclared (first use in this function)
   10 | if(i%9==0)printf("Yes");
      |    ^
main.c:10:11: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 | if(i%9==0)printf("Yes");
      |           ^~~~~~
main.c:10:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 | else printf("No");
      |      ^~~~~~
main.c:11:6: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

[18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
    string s;
    cin>>s;
    vector<int>v;
    for(int i=0; i<s.size(); i++){
        v.push_back(s[i]-'0');
    }
     int x=0;
    for( int i=0; i<v.size(); i++)
    x=x+v[i];
    if(x%9==0)
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;
    return 0;
}

Compiler output:
a.cc:1:12: error: invalid digit "8" in octal constant
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      |            ^~
a.cc:1:34: error: stray '#' in program
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      |                                  ^
a.cc:1:1: error: expected unqualified-id before '[' token
    1 | [18:32, 22/08/2020] ~Kaushal089: #include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string s;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>s;
      |     ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;
      |          ^
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int>v;
      |     ^~~~~~
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int>v;
      |            ^~~
a.cc:9:9: error: 'v' was not declared in this scope
    9 |         v.push_back(s[i]-'0');
      |         ^
a.cc:12:21: error: 'v' was not declared in this scope
   12 |     for( int i=0; i<v.size(); i++)
      |                     ^
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<"Yes"<<endl;
      |     ^~~~
a.cc:15:18: error: 'endl' was not declared in this scope
   15 |     cout<<"Yes"<<endl;
      |                  ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:17:17: error: 'endl' was not declared in this scope
   17 |     cout<<"No"<<endl;
      |                 ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected primary-expression before 'long'
   21 |     a= digit(long long int N );
      |              ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected primary-expression before 'long'
   21 |     a=long long int digit(long long int N );
      |       ^~~~
Language: C++

#include<stdio.h>
int main()
{
	long long int N,i,tmp,ret=0;
	scanf("%d",&N);
	while(N!=0)
	{
		tmp=N%10;
		n=N/10;
		ret +=tmp ;
	}
	if(ret%9==0)
	puts("Yes");
	else
	puts("No")	;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'n' was not declared in this scope
    9 |                 n=N/10;
      |                 ^
Language: C++

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


ll digSum(ll n) 
{ 
    ll sum = 0; 
     
    while(n > 0 || sum > 9) 
    { 
        if(n == 0) 
        { 
            n = sum; 
            sum = 0; 
        } 
        sum += n % 10; 
        n /= 10; 
    } 
    return sum; 
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: 'digsum' was not declared in this scope; did you mean 'digSum'?
   27 |         ll ans = digsum(n);
      |                  ^~~~~~
      |                  digSum
Language: C++

int main()
{
	std::string N;

	std::cin >> N;

	long long answer=0;
	for (const auto& str:N)
	{
		switch (str)
		{
		case '1':
			answer += 1;
			break;
		case'2':
			answer += 2;
			break;
		case'3':
			answer += 3;
			break;
		case'4':
			answer += 4;
			break;
		case'5':
			answer += 5;
			break;
		case'6':
			answer += 6;
			break;
		case'7':
			answer += 7;
			break;
		case'8':
			answer += 8;
			break;
		case'9':
			answer += 9;
			break;
		case'0':
			answer += 0;
			break;

		default:
			break;
		}
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'string' is not a member of 'std'
    3 |         std::string N;
      |              ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main()
a.cc:5:14: error: 'cin' is not a member of 'std'
    5 |         std::cin >> N;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:5:21: error: 'N' was not declared in this scope
    5 |         std::cin >> N;
      |                     ^
a.cc:50:22: error: 'cout' is not a member of 'std'
   50 |                 std::cout << "Yes" << std::endl;
      |                      ^~~~
a.cc:50:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:50:44: error: 'endl' is not a member of 'std'
   50 |                 std::cout << "Yes" << std::endl;
      |                                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
a.cc:54:22: error: 'cout' is not a member of 'std'
   54 |                 std::cout << "No" << std::endl;
      |                      ^~~~
a.cc:54:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:54:43: error: 'endl' is not a member of 'std'
   54 |                 std::cout << "No" << std::endl;
      |                                           ^~~~
a.cc:54:43: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++


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

double n;
double x;
long t;
long total;
    int main() {
    //nを入力
    cin >> n >> x >> t;
    long total = ceil(n/x);
    cout << total*t << endl;
}



#include <iostream>
using namespace std;    
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

long long n;
long long sum = 0;
    int main() {
    //nを入力
cin >> n;

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

Compiler output:
a.cc:26:11: error: conflicting declaration 'long long int n'
   26 | long long n;
      |           ^
a.cc:9:8: note: previous declaration as 'double n'
    9 | double n;
      |        ^
a.cc:28:9: error: redefinition of 'int main()'
   28 |     int main() {
      |         ^~~~
a.cc:13:9: note: 'int main()' previously defined here
   13 |     int main() {
      |         ^~~~
a.cc: In function 'int main()':
a.cc:33:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   33 | sum += n % 9;
      |        ~ ^ ~
      |        |   |
      |        |   int
      |        double
Language: C++

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


int main()
{
	string a;
    cin >> a;

    int i;
    i = 0;
    int sum;
    sum = 0;

    while (true) {
        if (!a[i]) break;
        sum = sum + stoi(a[i]);
        i++;
    }

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



Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   17 |         sum = sum + stoi(a[i]);
      |                     ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    8 |     ans += atoi(n[i]);
      |            ~~~~^~~~~~
      |                |
      |                __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: request for member 'size' in 'n', which is of non-class type 'char [1000000000000]'
    6 |   vector<int> a(n.size());
      |                   ^~~~
a.cc:7:19: error: request for member 'size' in 'n', which is of non-class type 'char [1000000000000]'
    7 |   for(int i=0;i<n.size();i++){
      |                   ^~~~
a.cc:11:19: error: request for member 'size' in 'n', which is of non-class type 'char [1000000000000]'
   11 |   for(int i=0;i<n.size();i++){
      |                   ^~~~
Language: C++

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


int main() {

int N;

string str = N.str();
  
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:16: error: request for member 'str' in 'N', which is of non-class type 'int'
   10 | string str = N.str();
      |                ^~~
Language: C++

#include <vector>
#include <unordered_set>
#include <sstream>
#include <iostream> 
 
 
using namespace std;
 
 
int main() {
	int n;
	cin >> n;
    
	int answer = 0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: 'Yes' was not declared in this scope
   21 |         cout <<  Yes << endl;
      |                  ^~~
a.cc:24:42: error: 'Yes' was not declared in this scope
   24 |                                 cout <<  Yes << endl;
      |                                          ^~~
a.cc:26:41: error: 'No' was not declared in this scope
   26 |                                 cout << No  << endl;
      |                                         ^~
Language: C

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath> 
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <typeinfo>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0; i<n; i++)
int a=0,b=0,c=0;

signed main(){
    string n;
    cin>>n;
    string str;
    rep(i,n.size()){
        str=n[i];
        b=atoi(str.c_str());
        a+=b;
    }
    if (a%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.
Language: C++

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

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

    char number[200000];
    int sum = 0;
    strcpy_s(number,200000, n.c_str());
    for (unsigned int i = 0; i < n.size(); i++) {
        sum += number[i] - '0';
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   14 |     strcpy_s(number,200000, n.c_str());
      |     ^~~~~~~~
      |     strcpy
Language: C++

#include <iostream>
#include <utility>
#include <boost/multiprecision/cpp_int.hpp>

using boost::multiprecision::cpp_int;
using namespace std;
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));
}
int main()
{
    cpp_int a, sum;
    cin >> a;
    if (isMulOf9(a))
        cout << "Yes\n";
    else
        cout << "No\n";
    return 0;
}


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



s = input()
sum = 0

while s > 9:
    sum += s % 10
    s = s / 10
sum += s

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

Compiler output:
a.cc:3:1: error: 's' does not name a type
    3 | s = input()
      | ^
Language: C++

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


int main() {

int N;

string str = N.str();
  
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:9:16: error: request for member 'str' in 'N', which is of non-class type 'int'
    9 | string str = N.str();
      |                ^~~
Language: C++

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

int main(){
    char n[200001];
    int ans=0,i=0;
    while(n[i]!='\0'){
        ans+=atoi(n[i])
        i++;
    }
    if(ans%9==0){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |         ans+=atoi(n[i])
      |                   ~~~^
      |                      |
      |                      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)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:9:24: error: expected ';' before 'i'
    9 |         ans+=atoi(n[i])
      |                        ^
      |                        ;
   10 |         i++;
      |         ~
Language: C++


s = input()
sum = 0

while s > 9:
    sum += s % 10
    s = s / 10
#    print("a")
sum += s

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

Compiler output:
a.cc:8:6: error: invalid preprocessing directive #print
    8 | #    print("a")
      |      ^~~~~
a.cc:11:2: error: invalid preprocessing directive #print
   11 | #print(sum)
      |  ^~~~~
a.cc:2:1: error: 's' does not name a type
    2 | s = input()
      | ^
Language: C++

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

// 多倍長テンプレ
/* ---------------------- ここから ---------------------- */
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
// 任意長整数型
using Bint = mp::cpp_int;
// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)
using Real = mp::number<mp::cpp_dec_float<1024>>;
/* ---------------------- ここまで ---------------------- */
Real N;

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

int main()
{
    cin >> N;
    Real res = findSumOfDigits(N);
    if (res % 9 == 0)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}


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

import java.util.Scanner;
import java.math.BigInteger;  
 
public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger x = sc.nextBigInteger();
    
    long sum = 0;
    while (x) {
      sum = sum + x%10;
      x = x / 10;
    }
   
    if (sum % 9 == 0) {
      System.out.println("Yes");
    }
    else {
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:11: error: incompatible types: BigInteger cannot be converted to boolean
    while (x) {
           ^
Main.java:12: error: bad operand types for binary operator '%'
      sum = sum + x%10;
                   ^
  first type:  BigInteger
  second type: int
Main.java:13: error: bad operand types for binary operator '/'
      x = x / 10;
            ^
  first type:  BigInteger
  second type: int
3 errors
Language: C++

/*GRATITUDE*/
/*1916057*/
//Arise Awake and Stop Not Till the Goal is reached. 
//Break through all barriers..
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define vi              vector<int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define endl            "\n"
#define PI                 acos(-1)
#define w(t)              int t; cin>>t; while(t--)
#define for_f(a,b,c)      for(int i=a;i<=b;i=i+c)
#define for_r(a,b,c)      for(int i=a;i>=b;i=i-c) 
#define trace1(x) cout << '>' << #x << ':' << (x) << "\n"
#define trace2(x,y) cout<< '>' << #x << ':' << (x) << " | " << #y << ':' << (y) << "\n"
#define trace3(a,b,c) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define trace4(a,b,c,d) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
void ash_god()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); 
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
}

/*************************************************************************************************/
//Write your functions here..............................
 


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

void solve() {
/*Write your code here*/
 string s; cin>>s;
 bool f=true;
 for_f (1,8,1) {
  if(count(s.begin(),s.end(),char('0'+i))!=count(s.begin(),s.end(),char('0'+9-i))) {f=false; break;}
 
 }
if(f) cout<<"Yes";
else {
  int res=0;
  int res=0;
 for_f (0,9,1) {
res+=count(s.begin(),s.end(),char('0'+i));
 }
 if(res%9==0) cout<<"Yes";
 else cout<<"No";
}

}
int32_t main()
{
ash_god();
bool tc=0;
if(tc)  {
    w(t) solve();
}
else solve();

return 0;
} 

Compiler output:
a.cc: In function 'void solve()':
a.cc:58:7: error: redeclaration of 'long long int res'
   58 |   int res=0;
      |       ^~~
a.cc:57:7: note: 'long long int res' previously declared here
   57 |   int res=0;
      |       ^~~
Language: C++

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

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

    char number[2010];
    int sum = 0;
    strcpy_s(number,2010, n.c_str());
    for (unsigned int i = 0; i < n.size(); i++) {
        sum += number[i] - '0';
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   14 |     strcpy_s(number,2010, n.c_str());
      |     ^~~~~~~~
      |     strcpy
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	n n;
	cin>>n;
	n sum=0;
	while(n>0){
	    sum=sum+n%10;
	    n=n/10;
	}
	sum%9==0?cout<<"Yes"<<endl:cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |         n n;
      |         ^
      |         yn
a.cc:8:10: error: expected ';' before 'sum'
    8 |         n sum=0;
      |          ^~~~
      |          ;
a.cc:10:13: error: 'sum' was not declared in this scope
   10 |             sum=sum+n%10;
      |             ^~~
a.cc:13:9: error: 'sum' was not declared in this scope
   13 |         sum%9==0?cout<<"Yes"<<endl:cout<<"No"<<endl;
      |         ^~~
Language: C++

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


int main() {

int N;
cin >> N;

string str = N.str();
  
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:16: error: request for member 'str' in 'N', which is of non-class type 'int'
   10 | string str = N.str();
      |                ^~~
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,i;
    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 <iostream>
using namespace std;
 
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:5:10: error: 'n' was not declared in this scope
    5 |   cin >> n;
      |          ^
a.cc:8:3: error: expected '}' before 'else'
    8 |   else{
      |   ^~~~
a.cc:6:13: note: to match this '{'
    6 |   if(n%9==0){
      |             ^
Language: C++

#include <iostream>

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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:10: error: 'n' was not declared in this scope
    4 |   cin >> n;
      |          ^
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout << "Yes";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:3: error: expected '}' before 'else'
    7 |   else{
      |   ^~~~
a.cc:5:13: note: to match this '{'
    5 |   if(n%9==0){
      |             ^
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "No";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
   unsigned long long int n,r,sum=0;
  
    cin>>n;
  
  while(n&&ct<=2)
  {
    r=n%10;
    sum=sum*10+r;
    n=n/10;
    ct++;
  }
  if(sum%9==0)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'ct' was not declared in this scope
    9 |   while(n&&ct<=2)
      |            ^~
Language: Java

import java.util.Scanner;
import java.math.BigInteger;  
 
public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger x = sc.nextBigInteger();
    
    long sum = 0;
    while (x) {
      sum = sum + x%10;
      x = x / 10;
    }
   
    if (sum % 9 == 0) {
      System.out.println("Yes");
    }
    else {
      System.out.println("No");
    }
}

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