buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
package main
import "fmt"
func main() {
var number string
sum := 0
fmt.Scanf("%s", &number)
for _, c := range number {
sum += int(c - '0')
}
if sum % 9 == 0 {
fmt.Println("yes")
} else {
fmt.Println("no")
}
} | package main
import "fmt"
func main() {
var number string
sum := 0
fmt.Scanf("%s", &number)
for _, c := range number {
sum += int(c - '0')
}
if sum % 9 == 0 {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
} | [] | 7 | 83 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < (int)s.size(); ++i) {
int x = s[i] - '0';
ans += x;
}
if (ans % 9 == 0) {
cout << "YES\n";
} ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < (int)s.size(); ++i) {
int x = s[i] - '0';
ans += x;
}
if (ans % 9 == 0) {
cout << "Yes\n";
} ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 116 |
#include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define all(x) x.begin(), x.end()
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef long long ll;
template <typename T> void max_self(T &a, T b) { a = max(a, b); }... | #include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define all(x) x.begin(), x.end()
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef long long ll;
template <typename T> void max_self(T &a, T b) { a = max(a, b); }... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 24], ["+", 0, 11, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 25], ["+", 0, 11, 12, 16, 12, 74, 51, 103, 0, 104], ["+", 0, 11, 12, 16, 12, 74, 51, 103, 0, 125]] | 1 | 205 |
#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false), cin.tie(NULL)
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
int main() {
IOS;
ll check = 0;
string str;
cin >> str;
for (auto ele : str) {
check += ele - '0'... | #include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false), cin.tie(NULL)
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
int main() {
IOS;
ll check = 0;
string str;
cin >> str;
for (auto ele : str) {
check += ele - '0'... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 92 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.size(); i++) {
sum = (sum + (int)s[i]) % 9;
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.size(); i++) {
sum = (sum + (s[i] - 48)) % 9;
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| [["-", 31, 23, 0, 16, 12, 74, 39, 77, 39, 40], ["-", 12, 16, 31, 23, 0, 16, 12, 74, 0, 25], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 1 | 92 |
#include <iostream>
using namespace std;
int main() {
char n;
int sumOfDigits = 0;
while ((n = getchar()) != '\n') {
sumOfDigits += (n - '0');
}
if (sumOfDigits % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <iostream>
using namespace std;
int main() {
char n;
int sumOfDigits = 0;
while ((n = getchar()) != '\n') {
sumOfDigits += (n - '0');
}
if (sumOfDigits % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 71 |
n=input()
a=len(b)
b=0
for i in range(a):
b=b+int(n[i])
if b%9==0:
print("Yes")
else:
print("No")
| n=input()
a=len(n)
b=0
for i in range(a):
b=b+int(n[i])
if b%9==0:
print("Yes")
else:
print("No")
| [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 54 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
string n;
cin >> n;
int digit_sum = 0;
for (int i = 0; i < n.size() - 1; i++) {
digit_sum += (n[i] - '0');
}
cout << (digit_sum % 9 == 0 ? "Yes" : "No") << endl;
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
string n;
cin >> n;
int digit_sum = 0;
for (int i = 0; i < n.size(); i++) {
digit_sum += (n[i] - '0');
}
cout << (digit_sum % 9 == 0 ? "Yes" : "No") << endl;
return 0;
}
| [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 90 |
#include <stdio.h>
#include <stdlib.h>
int main() {
int sum = 0;
char c;
while ((c = getchar()) != EOF) {
sum += c - '0';
}
if (sum % 9) {
printf("No\n");
} else {
printf("Yes\n");
}
} | #include <stdio.h>
#include <stdlib.h>
int main() {
int sum = 0;
char c;
while ((c = getchar()) != '\n') {
sum += c - '0';
}
if (sum % 9) {
printf("No\n");
} else {
printf("Yes\n");
}
} | [["-", 8, 9, 0, 52, 15, 23, 0, 16, 12, 22], ["+", 0, 52, 15, 23, 0, 16, 12, 103, 0, 104], ["+", 0, 52, 15, 23, 0, 16, 12, 103, 0, 44]] | 0 | 67 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string number;
cin >> number;
int i;
int sum = 0;
for (i = 0; i < number.size(); i++) {
sum += (number[i] - '0');
}
if (sum % 9 == 0) {
cout << "YES" << endl;
} else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string number;
cin >> number;
int i;
int sum = 0;
for (i = 0; i < number.size(); i++) {
sum += (number[i] - '0');
}
// cout<<"Sum = "<<sum<<endl;
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else
cout << "No" << endl;
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
#include <stack>
#define ll long long
const ll INF = 1000000007;
#define vecpair vector<pair<ll, ll>>
#define pb push_back
#define mp make_pair
#define vel vector<ll>
#define endl "\n"
#define forl for (int i = 0; i < n; i++)
const ll MAXN = 1000001;
bool prime[1000001];
vo... | #include <bits/stdc++.h>
using namespace std;
#include <stack>
#define ll long long
const ll INF = 1000000007;
#define vecpair vector<pair<ll, ll>>
#define pb push_back
#define mp make_pair
#define vel vector<ll>
#define endl "\n"
#define forl for (int i = 0; i < n; i++)
const ll MAXN = 1000001;
bool prime[1000001];
vo... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 636 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int Nnum = N.size();
vector<int> M(Nnum);
int sum = 0;
for (int i = 0; i < Nnum; ++i) {
M.at(i) = N.at(i);
}
for (int i = 0; i < Nnum; ++i) {
sum += M.at(i);
}
if (N == "0") {
cout << "Yes" << endl;
} el... | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int Nnum = N.size();
vector<int> M(Nnum);
int sum = 0;
for (int i = 0; i < Nnum; ++i) {
M.at(i) = N.at(i) - '0';
}
for (int i = 0; i < Nnum; ++i) {
sum += M.at(i);
}
if (N == "0") {
cout << "Yes" << endl;
... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 153 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
ll val = 0;
for (int i = 0; i < s.size(); i++) {
val = (val + (s[i] - '0')) % 9;
}
if (val == 0)
cout << "YES\n";
else
cout << "NO\n";
return 0;
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
ll val = 0;
for (ll i = 0; i < s.size(); i++) {
val = (val + (s[i] - '0')) % 9;
}
if (val == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 90 |
#include <iostream>
using namespace std;
bool calc(string n) {
long long int sum = 0;
while (n[0] != '\0') {
sum += n[0] - 48;
n = n.substr(1);
}
if (sum % 9 == 0) {
return true;
}
return false;
}
int main() {
string n;
getline(cin, n);
if (calc(n) == true) {
cout << "YES";
} else ... | #include <iostream>
using namespace std;
bool calc(string n) {
long long int sum = 0;
while (n[0] != '\0') {
sum += n[0] - 48;
n = n.substr(1);
}
if (sum % 9 == 0) {
return true;
}
return false;
}
int main() {
string n;
getline(cin, n);
if (calc(n) == true) {
cout << "Yes";
} else ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 110 |
#include <bits/stdc++.h>
#define int long long
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespa... | #include <bits/stdc++.h>
#define int long long
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespa... | [["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 73 |
/**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ii pair<int, int>
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()
#define set_vect(a, n) \
; ... | /**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ii pair<int, int>
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()
#define set_vect(a, n) \
; ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 338, 8, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 8, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 136 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < n.length(); i++) {
sum += n[i];
}
sum % 9 == 0 ? cout << "Yes" << endl : cout << "No" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < n.length(); i++) {
sum += n[i] - '0';
}
sum % 9 == 0 ? cout << "Yes" << endl : cout << "No" << endl;
return 0;
}
| [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 76 |
#include <stdio.h>
int main(void) {
char n[200001];
long res = 0;
scanf("%s", &n);
for (int i = 0; n[i] != '\0'; i++) {
res = res + (int)n[i];
}
if (res % 9 == 0) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | #include <stdio.h>
int main(void) {
char n[200001];
long res = 0;
scanf("%s", &n);
for (int i = 0; n[i] != '\0'; i++) {
res = res + (int)n[i] - 48;
}
if (res % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 93 |
#include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = (0); i < (n); i++)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define all(c) (c).begin(), (c).end()
#define sz(c) (int)(c).size()
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef long double ld;
... | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = (0); i < (n); i++)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define all(c) (c).begin(), (c).end()
#define sz(c) (int)(c).size()
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef long double ld;
... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 185 |
//#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#defin... | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#defin... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 336 |
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <locale>
#include <math.h>
#include <signal.h>
#include <string>
#include <vector>
#define fo(i, n) for (long long int i = 0; i < n; i++)
#define fo1(i, n) for (long long int i = 1; i <= (long long int)(n); i++)
#define pb push_back
#define fil... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <locale>
#include <math.h>
#include <signal.h>
#include <string>
#include <vector>
#define fo(i, n) for (long long int i = 0; i < n; i++)
#define fo1(i, n) for (long long int i = 1; i <= (long long int)(n); i++)
#define pb push_back
#define fil... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 222 |
// package basics.AtCoders;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String n = s.nextLine();
int sum = 0;
for (int i = 0; i < n.toString().length(); i++) {
sum = sum + Integer.parseInt(String.valueOf(n.charAt(i)... | // package basics.AtCoders;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String n = s.nextLine();
int sum = 0;
for (int i = 0; i < n.toString().length(); i++) {
sum = sum + Integer.parseInt(String.valueOf(n.charAt(i)... | [["-", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491]] | 3 | 119 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <stack>
#include <vector>
using namespace std;
void solve();
int main() { solve(); }
// ============= actual code starts here =================
const int limit = 100500 * 2;
char s[limit];
v... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <stack>
#include <vector>
using namespace std;
void solve();
int main() { solve(); }
// ============= actual code starts here =================
const int limit = 100500 * 2;
char s[limit];
v... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 129 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int res = 0;
for (int i = 0; i < s.length(); i++) {
res += s[i];
}
if (res % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int res = 0;
for (int i = 0; i < s.length(); i++) {
res += s[i] - '0';
}
if (res % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 79 |
i = int(input())
if i % 9:
print("NO")
else:
print("YES") | i = int(input())
if i % 9:
print("No")
else:
print("Yes") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 27 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 666666, inf = 0x3f3f3f3f;
signed main() {
string s;
int p = 0;
cin >> s;
for (int i = 0; i < s.size(); i++)
p += (int)(s.size() - '0');
if (p % 9)
cout << "No";
else
cout << "Yes";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 666666, inf = 0x3f3f3f3f;
signed main() {
string s;
int p = 0;
cin >> s;
for (int i = 0; i < s.size(); i++)
p += (int)(s[i] - '0');
if (p % 9)
cout << "No";
else
cout << "Yes";
return 0;
} | [["-", 51, 23, 0, 16, 31, 2, 63, 118, 17, 131], ["-", 51, 23, 0, 16, 31, 2, 63, 118, 119, 120], ["-", 51, 23, 0, 16, 31, 2, 3, 4, 0, 24], ["-", 51, 23, 0, 16, 31, 2, 3, 4, 0, 25], ["+", 51, 23, 0, 16, 31, 69, 341, 342, 0, 70], ["+", 51, 23, 0, 16, 31, 69, 341, 342, 0, 22], ["+", 51, 23, 0, 16, 31, 69, 341, 342, 0, 73]] | 1 | 94 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.length(); i++)
sum += s[i] - '0';
if (sum % 9 == 0)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.length(); i++)
sum += s[i] - '0';
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
} | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 91 |
/*
Author : Ritesh Singh
*/
#include <bits/stdc++.h>
using namespace std;
#define lct \
long long int t; \
cin >> t; ... | /*
Author : Ritesh Singh
*/
#include <bits/stdc++.h>
using namespace std;
#define lct \
long long int t; \
cin >> t; ... | [["-", 0, 37, 0, 16, 31, 16, 12, 103, 0, 125], ["+", 8, 9, 0, 37, 0, 16, 12, 103, 0, 125], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 12, 13]] | 1 | 128 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int sum = 0;
for (int i = 0; i < a.length(); i++) {
sum += (a[i] - '0');
}
if ((sum % 9) == 0)
cout << "Yes" << endl;
else
cout << "NO" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int sum = 0;
for (int i = 0; i < a.length(); i++) {
sum += (a[i] - '0');
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 87 |
#include <stdio.h>
int main() {
int n, a = 0, b;
char N[200000 + 1];
scanf("%s", N);
while (N[a] != '\0') {
n = N[a] - 0;
b += n;
a++;
}
if (b % 9 == 0) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | #include <stdio.h>
int main() {
int n, a = 0, b;
char N[200000 + 1];
scanf("%s", N);
while (N[a] != '\0') {
n = N[a] - '0';
b = b + n;
a++;
}
if (b % 9 == 0) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | [["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72]] | 0 | 93 |
n = input()
s = 0
for i in range(len(n)):
s+= int(n[i])
if s % 9 == 0:
print('YES')
else:
print('NO') | n = input()
s = 0
for i in range(len(n)):
s+= int(n[i])
if s % 9 == 0:
print('Yes')
else:
print('No') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 49 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
long long int sum = 0;
for (int i = 0; i < str.size(); i++) {
sum = sum + (str[i] - '0');
}
if (sum % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
long long int sum = 0;
for (int i = 0; i < str.size(); i++) {
sum = sum + (str[i] - '0');
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
int main() {
string s;
cin >> s;
int n = s.size();
int sum = 0;
rep(i, n) sum += s[i];
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;
int main() {
string s;
cin >> s;
int n = s.size();
int sum = 0;
rep(i, n) sum += s[i] - '0';
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 88 |
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | [["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 450 |
s=list(input())
ans=0
for i in range(len(s)):
ans+=s[i]
ans%=9
if ans==0:
print("Yes")
else:
print("No") | s=list(input())
ans=0
for i in range(len(s)):
ans+=int(s[i])
ans%=9
if ans==0:
print("Yes")
else:
print("No")
| [["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]] | 5 | 50 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define pb push_back
#define mod 1000000007
#define mp make_pair
#define f... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define pb push_back
#define mod 1000000007
#define mp make_pair
#define f... | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 251 |
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int i, sum = 0;
char a[210];
cin >> a;
for (i = 0; i < strlen(a); i++) {
sum = sum + (a[i] - '0');
i++;
}
if (sum % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
}
| #include <cstring>
#include <iostream>
using namespace std;
int main() {
int i, sum = 0;
char a[200001];
cin >> a;
for (i = 0; i < strlen(a); i++) {
sum = sum + (a[i] - '0');
}
if (sum % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29]] | 1 | 93 |
#include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
long long size = n.size(), sum = 0;
for (long long i = 0; i < size; i++)
sum += (n[i] - '0');
if (sum % 9 == 0)
cout << "Yes";
else
cout << "NO";
}
| #include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
long long size = n.size(), sum = 0;
for (long long i = 0; i < size; i++)
sum += (n[i] - '0');
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
} | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 82 |
#include <iostream>
using namespace std;
int main() {
string s;
int i, ans = 0;
cin >> s;
for (i = 0; i < s.size(); i++) {
ans += (s[i] = '0');
}
if (ans % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <iostream>
using namespace std;
int main() {
string s;
int i, ans = 0;
cin >> s;
for (i = 0; i < s.size(); i++) {
ans += (s[i] - '0');
}
if (ans % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 0, 1, 0, 11, 12, 23, 0, 42, 0, 32], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33]] | 1 | 87 |
#include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < n; i = i + 1)
#define array(N, t) (t *)calloc(N, sizeof(t))
#define ll long long
#define INF ((1LL << 62) - (1LL << 31))
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
int main() {
char N[200010];
sca... | #include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < n; i = i + 1)
#define array(N, t) (t *)calloc(N, sizeof(t))
#define ll long long
#define INF ((1LL << 62) - (1LL << 31))
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
int main() {
char N[200010];
sca... | [["-", 0, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 0, 9, 0, 57, 15, 23, 0, 16, 17, 60]] | 0 | 130 |
N=list(map(int,input().split()))
SUM=0
for i in N:
SUM+=i
if SUM%9==0:
print("YES")
else:
print("NO") | N=list(map(int,input().split()))
SUM=0
for i in N:
SUM+=i
if SUM%9==0:
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 49 |
#include <bits/stdc++.h>
#include <iostream>
#define ll long long
using namespace std;
int main() {
string str;
cin >> str;
ll sum = 0;
for (ll i = 0; i < str.size(); i++) {
sum += str[i] - '0';
}
if (sum % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
#include <iostream>
#define ll long long
using namespace std;
int main() {
string str;
cin >> str;
ll sum = 0;
for (ll i = 0; i < str.size(); i++) {
sum += str[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 85 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
long long int sum = 0;
for (int i = 0; i < s.size(); ++i) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
/*int t; cin>>t;
while(t--)
{
int c=0, st=105, end;
string s; cin>>s; int n=s.size();
for(int i=0; i<n; ++i)
{
... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 93 |
#include <iostream>
using namespace std;
int main() {
string N;
long long int sum = 0, i;
cin >> N;
for (i = 0; i < N.length(); i++) {
sum = sum + N[i];
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
string N;
long long int sum = 0, i;
cin >> N;
for (i = 0; i < N.length(); i++) {
sum = sum + N[i] - '0';
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int n = N.size();
int count = 0;
for (int i = 0; i < n; i++) {
count += N[i] - '0';
}
cout << count;
if (count % 9 == 0)
cout << "Yes";
else
cout << "No";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int n = N.size();
int count = 0;
for (int i = 0; i < n; i++) {
count += N[i] - '0';
}
if (count % 9 == 0)
cout << "Yes";
else
cout << "No";
} | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 85 |
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define F first
#define S second
#define forn(i, n) for (int i = 0; i < (int)n; i++)
#define pb push_back
#define fastIO ios::sync_with_stdio(0), cin.tie(0)
#defin... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define F first
#define S second
#define forn(i, n) for (int i = 0; i < (int)n; i++)
#define pb push_back
#define fastIO ios::sync_with_stdio(0), cin.tie(0)
#defin... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 216 |
#include <bits/stdc++.h>
using namespace std;
#define fastIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define endl '\n'
#define ft first
#define sd second
#define pb push_back
#define pob pop_back()
#define pf push_front
#define pof pop_front()
#define all(x) (x).begin(), (xe).end()
#define rall(x) (x).rbegin()... | #include <bits/stdc++.h>
using namespace std;
#define fastIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define endl '\n'
#define ft first
#define sd second
#define pb push_back
#define pob pop_back()
#define pf push_front
#define pof pop_front()
#define all(x) (x).begin(), (xe).end()
#define rall(x) (x).rbegin()... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 162 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (i = a; i <= b; i++)
#define FOD(i, b, a) for (i = a; i >= b; i--)
#define pa pair<int, int>
#define fi first
#define se second
#define task "x"
typedef long long ll;
const ll M = 1e6 + 1;
const ll N = 1e4 + 1;
using namespace std;
string s;
ll i, j, ans = 0;
bool kt... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (i = a; i <= b; i++)
#define FOD(i, b, a) for (i = a; i >= b; i--)
#define pa pair<int, int>
#define fi first
#define se second
#define task "x"
typedef long long ll;
const ll M = 1e6 + 1;
const ll N = 1e4 + 1;
using namespace std;
string s;
ll i, j, ans = 0;
bool kt... | [["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 217 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
long long sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += s[i] - '0';
}
if (sum % 9) {
cout << "NO" << '\n';
} else {
cout << "YES" << '\n';
}
return ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += s[i] - '0';
}
// cout << sum << '\n';
if (sum % 9) {
cout << "No" << '\n';
} else {
cout << "Yes" << ... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 104 |
//#include <bits/stdc++.h>
#include <algorithm>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define ii pair<int, int>
#define lli long long
#define pb push_back
#define X first
#define Y second
const int Mod = 1E9 + 7;
const int Inf =... | //#include <bits/stdc++.h>
#include <algorithm>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define ii pair<int, int>
#define lli long long
#define pb push_back
#define X first
#define Y second
const int Mod = 1E9 + 7;
const int Inf =... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 206 |
n=int(input())
l=list(map(int,str(n)))
a=sum(l)
if l%9==0:
print('Yes')
else:
print('No') | n=int(input())
l=list(map(int,str(n)))
a=sum(l)
if a%9==0:
print('Yes')
else:
print('No')
| [["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 49 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
string N;
cin >> N;
ll sum = 0;
int num = N.size();
for (int i = 0; i < num; i++) {
sum += int(N[i]);
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "N... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
string N;
cin >> N;
ll sum = 0;
int num = N.size();
for (int i = 0; i < num; i++) {
sum += N[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 40], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
long long int result = 0, i;
for (i = 0; i < n.length(); i++) {
result += n[i] - '0';
}
if (result % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
long long int result = 0, i;
cin >> n;
for (i = 0; i < n.length(); i++) {
result += n[i] - '0';
}
if (result % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int t = 0;
cin >> s;
for (int i = 0; i < s.size(); i++) {
t += s[i] - 0;
}
if (t % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int t = 0;
cin >> s;
for (int i = 0; i < s.size(); i++) {
t += s[i] - '0';
}
if (t % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| [["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104]] | 1 | 85 |
#include <bits/stdc++.h>
using namespace std;
signed main() {
string s;
unsigned long long sum = 0;
cin >> s;
for (int i = 0; i < (int)s.size(); ++i)
sum += (s[i] - '0');
if (sum % 9 == 0)
cout << "YES\n";
else
cout << "NO\n";
} | #include <bits/stdc++.h>
using namespace std;
signed main() {
string s;
unsigned long long sum = 0;
cin >> s;
for (int i = 0; i < (int)s.size(); ++i)
sum += (s[i] - '0');
if (sum % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
} | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 83 |
import numpy as np
N=int(input())
Nstr=list(str(N))
sum=0
for i in np.arange(len(Nstr)):
sum+=Nstr[i]
if (sum%9==0):
print("Yes")
else:
print("No") | import numpy as np
N=int(input())
Nstr=list(str(N))
sum=0
for i in np.arange(len(Nstr)):
sum+=int(Nstr[i])
if (sum%9==0):
print("Yes")
else:
print("No") | [["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]] | 5 | 66 |
import math
def keta(s):
if len(s) < 2:
return int(s)
n = sum(map(int, s))
return keta(str(n))
def main():
N = input()
if keta(N) == 9:
print("Yes")
else:
print("No")
if __name__ == "__main__":
main() | import math
def keta(s):
if len(s) < 2:
return int(s)
n = sum(map(int, s))
return keta(str(n))
def main():
N = input()
# N, X, T = list(map(int, input().split()))
if keta(N) % 9 == 0:
print("Yes")
else:
print("No")
if __name__ == "__main__":
main() | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 82 |
N = int(input())
if N%9 == 0:
print(Yes)
else:
print(No) | N = int(input())
if N%9 == 0:
print('Yes')
else:
print('No') | [["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 25 |
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string N;
cin >> N;
int L = N.size();
int S = 0;
for (int i = 0; i < L; i++) {
int n = N[i];
S += n;
S %= 9;
}
if (S == 0)
cout << "Yes"... | #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string N;
cin >> N;
int L = N.size();
int S = 0;
for (int i = 0; i < L; i++) {
int n = N[i] - '0';
S += n;
S %= 9;
}
if (S == 0)
cout <<... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 43, 49, 50, 51, 16, 12, 103, 0, 104], ["+", 0, 43, 49, 50, 51, 16, 12, 103, 0, 125]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.length(); i++) {
sum += (s[i] - '0');
}
if (sum % 9)
cout << "NO\n";
else
cout << "YES\n";
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
cin.tie(0);
ios_base::sync_with_stdio(0);
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.length(); i++) {
sum += (s[i] - '0');
}
if (sum % 9)
cout << "No\n";
else
cout << "Yes\n";
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 95 |
#include <iostream>
#include <string>
using namespace std;
int main(void) {
string N;
cin >> N;
int a = 0;
for (int i = 0; i < size(N); i++) {
a += N[i];
}
if (a % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string N;
cin >> N;
// cout<<N<<endl;
long a = 0;
for (long i = 0; i < size(N); i++) {
a += (N[i] - 48);
// cout<<N[i];
}
// cout<<endl<<a<<endl;
if (a % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" <... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11,... | 1 | 85 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int x = s.length();
long long int sum = 0;
for (int i = 0; i < x; i++) {
sum = sum + (s[i] - '0');
}
if (sum % 9 == 0) {
cout << "YES";
} else {
cout << "NO";
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int x = s.length();
long long int sum = 0;
for (int i = 0; i < x; i++) {
sum = sum + (s[i] - '0');
}
if (sum % 9 == 0) {
cout << "Yes";
} else {
cout << "No";
}
} | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 91 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += (int)s[i];
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
retur... | [["-", 8, 9, 0, 1, 0, 11, 12, 74, 0, 24], ["-", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 96 |
// fuck ratings, i am in love with learning process
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define tez \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... |
// fuck ratings, i am in love with learning process
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define tez \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | [["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 100 |
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String n = sc.next();
long sum = 0;
for (char c : n.toCharArray()) {
sum += Character.getNumericValue(c);
}
if (sum % 9 == 0 && sum != 0) {
System.out.p... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String n = sc.next();
long sum = 0;
for (char c : n.toCharArray()) {
sum += Character.getNumericValue(c);
}
if (sum % 9 == 0) {
System.out.println("Yes"... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 79], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]] | 3 | 111 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
string N;
int sum = 0;
cin >> N;
int n = (int)(N.length());
for (int i = 0; i < n; i++) {
sum += N[i];
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
retu... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
string N;
int sum = 0;
cin >> N;
int n = (int)(N.length());
for (int i = 0; i < n; i++) {
sum += N[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 95 |
n=int()
array=list(map(int,n))
a=sum(array)
if a%9==0:
print('Yes')
else:
print('No') | n=input()
array=list(map(int,n))
a=sum(array)
if a%9==0:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 43 |
#include <stdio.h>
#include <string.h>
int main() {
char *str;
int len, sum;
scanf("%s", str);
len = strlen(str);
sum = 0;
for (int i = 0; i < len; i++) {
sum += (str[i] - '0');
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| #include <stdio.h>
#include <string.h>
int main() {
char str[2000000];
int len, sum;
scanf("%s", str);
len = strlen(str);
sum = 0;
for (int i = 0; i < len; i++) {
sum += (str[i] - '0');
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 84, 0, 48], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73]] | 0 | 100 |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
long long n, h, i, j, t, m, l, r, q;
long long p = 0, k, w, z, x, y, d, p1, h1;
string s = "", st = "", s1 = "", s2 = "";
q = 1;
for (l = 0; l < q; l++) {
std::cin >> s;
n = s.length();
p = 0;
fo... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
long long n, h, i, j, t, m, l, r, q;
long long p = 0, k, w, z, x, y, d, p1, h1;
string s = "", st = "", s1 = "", s2 = "";
q = 1;
for (l = 0; l < q; l++) {
std::cin >> s;
n = s.length();
p = 0;
fo... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 180 |
#include <bits/stdc++.h>
#define inf 0x3f3f3f3f
#define ll long long
using namespace std;
const int maxn = 1e5 + 5;
int main() {
string n;
cin >> n;
int x = 0;
for (int i = 0; i < n.size(); i++) {
x += n[i] - '0';
x %= 9;
}
if (x)
cout << "NO" << endl;
else
cout << "YES" << endl;
} | #include <bits/stdc++.h>
#define inf 0x3f3f3f3f
#define ll long long
using namespace std;
const int maxn = 1e5 + 5;
int main() {
string n;
cin >> n;
int x = 0;
for (int i = 0; i < n.size(); i++) {
x += n[i] - '0';
x %= 9;
}
if (x)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 94 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int sum = 0;
for (int i = 0; i < N.size(); i++) {
sum += (int)N[i];
}
// cout << sum;
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int sum = 0;
for (int i = 0; i < N.size(); i++) {
sum += N[i] - '0';
// cout << sum << endl;
}
// cout << N.size();
// cout << sum;
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;... | [["-", 8, 9, 0, 1, 0, 11, 12, 74, 0, 24], ["-", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 84 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string num;
cin >> num;
int sum = 0;
int n = num.size();
for (int i = 0; i < n; ++i) {
int temp = num[i] - '0';
sum += temp;
}
if (sum % 9 == 0) {
cout << "YES" << endl;
} else {
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string num;
cin >> num;
int sum = 0;
int n = num.size();
for (int i = 0; i < n; ++i) {
int temp = num[i] - '0';
sum += temp;
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 111 |
N = input()
ans = 0
for n in N:
ans = (ans + int(n)) % 9
if ans == 0: print("YES")
else: print("NO") | N = input()
ans = 0
for n in N:
ans = (ans + int(n)) % 9
if ans == 0:
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 44 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
sc.close();
// int N = Integer.parseInt(str);
int count = 0;
for (int i = 0; i < str.length(); i++) {
count += str.charAt(i) - '0';
}
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
sc.close();
// int N = Integer.parseInt(str);
int count = 0;
for (int i = 0; i < str.length(); i++) {
count += str.charAt(i) - '0';
}
... | [["-", 0, 510, 15, 23, 0, 16, 31, 16, 17, 85], ["+", 0, 510, 15, 23, 0, 16, 31, 16, 17, 109]] | 3 | 110 |
N=list(input())
S=[int(t) for t in N]
T=sum(s)
if T%9==0:
print("Yes")
else :
print("No") | N=list(input())
S=[int(t) for t in N]
T=sum(S)
if T%9==0:
print("Yes")
else :
print("No") | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 47 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int answer{0};
for (int i = 0; i < s.length(); i++) {
int k = int(s[i]) - 48;
answer = (answer + k) % 9;
// cout<<answer<<endl;
}
if (answer > 1) {
cout << "No";
} else
cout << "Yes";
return 0;
}
| #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int answer{0};
for (int i = 0; i < s.length(); i++) {
int k = int(s[i]) - 48;
answer = (answer + k) % 9;
// cout<<answer<<endl;
}
if (answer >= 1) {
cout << "No";
} else
cout << "Yes";
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 93 |
#include <iostream>
using namespace std;
char num[2005];
int sum;
int main() {
cin >> num;
for (int i = 0; num[i]; i++) {
sum += num[i];
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
} | #include <iostream>
using namespace std;
char num[200005];
int sum;
int main() {
cin >> num;
for (int i = 0; num[i]; i++) {
sum += num[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
} | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 73 |
// template
import java.io.*;
import java.util.*;
import java.util.stream.Stream;
public class Main {
static BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
static PrintWriter out =
new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
public static void ... |
// template
import java.io.*;
import java.util.*;
import java.util.stream.Stream;
public class Main {
static BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
static PrintWriter out =
new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
public static void ... | [["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 478 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pcc = pair<char, char>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using tuplis = array<ll, 3>;
template <class T> using p... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pcc = pair<char, char>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using tuplis = array<ll, 3>;
template <class T> using p... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 4,048 |
n=input()
t=0
for i in n:
t+=int(i)
if t//9==0:
print('Yes')
else:
print('No') | n=input()
t=0
for i in n:
t+=int(i)
if t%9==0:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109]] | 5 | 40 |
// author: JainBot27
// Created on: 08/22/20
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define ts to_string
#define ub upper_bound
#define lb lower_bound
#define ar array... | // author: JainBot27
// Created on: 08/22/20
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define ts to_string
#define ub upper_bound
#define lb lower_bound
#define ar array... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 762 |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define FOR(i, n) for (int i = 1; i <= n; i++)
#define F0R(i, n) for (int i = 0; i < n; i++)
#define mp make_pair
#define pb push_back
#define f first
#define s second
// var
string s;
LL su = 0;
int main() {
ios_base::s... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define FOR(i, n) for (int i = 1; i <= n; i++)
#define F0R(i, n) for (int i = 0; i < n; i++)
#define mp make_pair
#define pb push_back
#define f first
#define s second
// var
string s;
LL su = 0;
int main() {
ios_base::s... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 142 |
print("Yes" if int(input())%9==o else "No") | print("Yes" if int(input())%9==0 else "No") | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 612]] | 5 | 21 |
// At_coder
// Bismillahir Rahmanir Rahim
#include <iostream>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int n, t, a, sum = 0;
string s, ss;
cin >> s;
for (int i = 0; i < s.size(); i++) {
n = s[i] - 48;
sum += n;
}
(sum % 9 == 0) ? cout << "YES" << endl : cout << "NO" << endl;
} | // At_coder
// Bismillahir Rahmanir Rahim
#include <iostream>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int n, t, a, sum = 0;
string s, ss;
cin >> s;
for (int i = 0; i < s.size(); i++) {
n = s[i] - 48;
sum += n;
}
(sum % 9 == 0) ? cout << "Yes" << endl : cout << "No" << endl;
} | [["-", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 64, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6]] | 1 | 92 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
StringBuilder st = new StringBuilder(s.next());
int sum = 0;
for (int i = 0; i < st.length(); i++) {
sum += st.charAt(i) - 48;
}
if (sum % 9 == 0)
System.out.println... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
StringBuilder st = new StringBuilder(s.next());
int sum = 0;
for (int i = 0; i < st.length(); i++) {
sum += st.charAt(i) - 48;
}
if (sum % 9 == 0)
System.out.println... | [["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 115 |
n=int(input())
print('Yneos'[(n%9!=0)::2]) | n=int(input())
print('YNeos'[(n%9!=0)::2])
| [["-", 0, 652, 3, 4, 0, 206, 51, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 206, 51, 557, 0, 6]] | 5 | 26 |
#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 _ ... | #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 _ ... | [["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125]] | 1 | 152 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string input;
int i, sum = 0;
cin >> input;
for (i = 0; i < input.length(); i++) {
sum += input[0] - '0';
}
if (sum % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string input;
int i, sum = 0;
cin >> input;
for (i = 0; i < input.length(); i++) {
sum += input[i] - '0';
}
if (sum % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
return 0;
} | [["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]] | 1 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int l = s.length();
long long int sum = 0;
for (int i = 0; i < l; i++) {
sum = sum + s[i];
}
if (sum % 9 == 0) {
cout << "Yes";
} else
cout << "No";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int l = s.length();
long long int sum = 0;
for (int i = 0; i < l; i++) {
sum = sum + (s[i] - '0');
}
if (sum % 9 == 0) {
cout << "Yes";
} else
cout << "No";
return 0;
}
| [["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 23, 0, 16, 12, 103, 0, 104], ["+", 12, 16, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 86 |
#include <iostream>
#include <string>
using namespace std;
int main() {
char n[200001];
int ans = 0, i = 0;
while (n[i] != '\0') {
ans += n[i] - 48;
i++;
}
if (ans % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
char n[200001];
int ans = 0, i = 0;
cin >> n;
while (n[i] != '\0') {
ans += n[i] - 48;
i++;
}
if (ans % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 83 |
N = list(input())
NSum = 0
ans = "No"
for i in N:
NSum += int(i)
if NSum % 9 == 0:
ans == "Yes"
print(ans) | N = list(input())
NSum = 0
ans = "No"
for i in N:
NSum += int(i)
if NSum % 9 == 0:
ans = "Yes"
print(ans) | [["-", 0, 57, 64, 196, 0, 1, 0, 666, 667, 60], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32]] | 5 | 43 |
#include <bits/stdc++.h>
#define pb push_back
#define PQ priority_queue
#define make_unique(x) \
sort((x).begin(), (x).end()); \
(x).erase(unique((x).begin(), (x).end()), (x).end())
typedef long long ll;
typedef... | #include <bits/stdc++.h>
#define pb push_back
#define PQ priority_queue
#define make_unique(x) \
sort((x).begin(), (x).end()); \
(x).erase(unique((x).begin(), (x).end()), (x).end())
typedef long long ll;
typedef... | [["-", 0, 41, 64, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 41, 64, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 41, 75, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 41, 75, 2, 3, 4, 0, 5, 0, 6]] | 1 | 142 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
long long int x = 0;
for (long long int i = 0; i < s.size(); i++) {
x += (s[i] - '0');
}
if (x % 9 == 0)
cout << "YES\n";
else
cout << "NO\n";
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
long long int x = 0;
for (long long int i = 0; i < s.length(); i++) {
x += (s[i] - '0');
}
if (x % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
return 0;
}
| [["-", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 89 |
#include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < (int)n.size(); i++) {
sum += n[i] - '0';
}
sum % 9 == 0 ? cout << "Yes" << endl : cout << "NO" << endl;
} | #include <iostream>
using namespace std;
int main() {
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < (int)n.size(); i++) {
sum += n[i] - '0';
}
sum % 9 == 0 ? cout << "Yes" << endl : cout << "No" << endl;
} | [["-", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 41, 75, 16, 31, 16, 12, 5, 0, 6]] | 1 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int s = 0;
for (int i = 0; i < n.size(); i++) {
int a = n[i] - '0';
s += a;
}
if (s % 9 == 0)
cout << "Yse" << endl;
else
cout << "No" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
long long s = 0;
for (int i = 0; i < n.size(); i++) {
long long a = n[i] - '0';
s += a;
}
if (s % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 85 |
print("YNeos"[int(input())%9==0::2]) | print("YNeos"[int(input())%9!=0::2]) | [["-", 3, 4, 0, 206, 206, 663, 0, 666, 667, 60], ["+", 3, 4, 0, 206, 206, 663, 0, 666, 667, 79]] | 5 | 21 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
void solve() {
cin >> s;
ll sum = 0;
ll N = s.length();
for (ll i = 0; i < N; i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "YES"
<< "\n";
else {
cout << "NO\n";
}
}
signed main() {
ios_base::syn... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
void solve() {
cin >> s;
ll sum = 0;
ll N = s.length();
for (ll i = 0; i < N; i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes"
<< "\n";
else {
cout << "No\n";
}
}
signed main() {
ios_base::syn... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 124 |
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--) {
int ans = 0;
char p;
while (cin >> p) {
ans += p - 48;
}
cout << (ans % 9 == 0 ? "YES" : "NO") << ... | #include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--) {
int ans = 0;
char p;
while (cin >> p) {
ans += p - 48;
}
cout << (ans % 9 == 0 ? "Yes" : "No") << ... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 90 |
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--) {
string s;
cin >> s;
int ans = 0;
for (auto x : s)
ans += x - '0';
cout << (ans % 9 == 0 ? "YES" : ... | #include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--) {
string s;
cin >> s;
int ans = 0;
for (auto x : s)
ans += (x - '0');
cout << (ans % 9 == 0 ? "Yes" ... | [["+", 0, 338, 8, 1, 0, 11, 12, 23, 0, 24], ["+", 0, 338, 8, 1, 0, 11, 12, 23, 0, 25], ["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 95 |
#include <bits/stdc++.h>
using namespace std;
#define ar array
#define endl '\n'
#define ll long long
#define in insert
#define pb push_back
#define vt vector
#define P_Q(x) priority_queue<x>
#define p_q(x) priority_queue<x, vector<x>, greater<x>>
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define Rev(i, a, b) f... | #include <bits/stdc++.h>
using namespace std;
#define ar array
#define endl '\n'
#define ll long long
#define in insert
#define pb push_back
#define vt vector
#define P_Q(x) priority_queue<x>
#define p_q(x) priority_queue<x, vector<x>, greater<x>>
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define Rev(i, a, b) f... | [["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 202 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.