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 |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int a = 0;
for (int i = 0; i < n.size(); i++) {
a += n.at(i);
}
if (a % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int a = 0;
for (int i = 0; i < n.size(); i++) {
a += n.at(i) - 48;
}
if (a % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 78 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long sum = 0;
for (int i = 0; i < s.length(); i++) {
sum += (s[i] - '0');
sum = (sum % 9);
}
if (sum % 9 == 0)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long sum = 0;
for (int i = 0; i < s.length(); i++) {
sum += (s[i] - '0');
sum = (sum % 9);
}
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 | 90 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
int digitSum = 0;
for (int i = 0; i < n; i++) {
digitSum += s[i] - '0';
digitSum = digitSum % 9;
}
if (digitSum % 9 == 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
int digitSum = 0;
for (int i = 0; i < n; i++) {
digitSum += s[i] - '0';
digitSum = digitSum % 9;
}
if (digitSum % 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 | 98 |
#include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
ll x = 0, sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "YES";
else
cout << "NO";
} | #include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
ll x = 0, sum = 0;
for (int i = 0; i < s.size(); i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
} | [["-", 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 | 87 |
<?php
$str = fgets(STDIN);
$strlen = strlen($str);
$sum = 0;
for($i=0;$i<$strlen; $i++){
$sum += (int)$str[$i];
}
echo ($sum % 9 == 0)? "YES" : "NO" ;
| <?php
$str = fgets(STDIN);
$strlen = strlen($str);
$sum = 0;
for($i=0;$i<$strlen; $i++){
$sum += (int)$str[$i];
}
echo ($sum % 9 == 0)? "Yes" : "No" ;
| [["-", 0, 493, 0, 608, 0, 41, 8, 609, 0, 610], ["+", 0, 493, 0, 608, 0, 41, 8, 609, 0, 610], ["-", 0, 493, 0, 608, 0, 41, 75, 609, 0, 610], ["+", 0, 493, 0, 608, 0, 41, 75, 609, 0, 610]] | 6 | 73 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld double
#define REP(i, x, n) for (ll i = x; i < n; i++)
#define SZ(v) (ll) v.size()
#define endl "\n"
#define ff first
#define ss second
#define PQ_MIN priority_queue<ll, vector<ll>,... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld double
#define REP(i, x, n) for (ll i = x; i < n; i++)
#define SZ(v) (ll) v.size()
#define endl "\n"
#define ff first
#define ss second
#define PQ_MIN priority_queue<ll, vector<ll>,... | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 691 |
// Multiple of 9.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
using namespace std;
#include <string>
int main() {
string s;
cin >> s;
long long n = 0;
for (int i = 0; i < s.size(); i++) {
n += int(s[i]) - 48;
n = n % 9;
}
if (n % 9 == 0) {... | // Multiple of 9.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
using namespace std;
#include <string>
int main() {
string s;
cin >> s;
long long n = 0;
for (long long i = 0; i < s.size(); i++) {
n += int(s[i]) - 48;
n = n % 9;
}
if (n % 9 =... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 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 | 96 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F(i, m, n) for (ll i = m; i < n; i++)
#define Fr(j, n, m) for (ll j = n; j >= m; j--)
#define vll vector<ll>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define vpll vector<pll>
#define tlll tuple<ll, ll, ll>
/*-----------------... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F(i, m, n) for (ll i = m; i < n; i++)
#define Fr(j, n, m) for (ll j = n; j >= m; j--)
#define vll vector<ll>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define vpll vector<pll>
#define tlll tuple<ll, ll, ll>
/*-----------------... | [["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 25], ["-", 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 | 284 |
a=list(input())
cnt=0
for i in a:
b=int(i)
cnt=(cnt+b)//9
if cnt==0:
print("Yes")
else:
print("No") | a=list(input())
cnt=0
for i in a:
b=int(i)
cnt=(cnt+b)%9
if cnt==0:
print("Yes")
else:
print("No") | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109]] | 5 | 50 |
#include <bits/stdc++.h>
#define int long long int
using namespace std;
signed main() {
int t;
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\n";
} else
cout << "No\n";
}
| #include <bits/stdc++.h>
#define int long long int
using namespace std;
signed main() {
int t;
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\n";
} else
cout << "No\n";
}
| [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
#define faster \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pi acos... | #include <bits/stdc++.h>
using namespace std;
#define faster \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define pi acos... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]] | 1 | 232 |
#include <bits/stdc++.h>
using namespace std;
#define nl "\n"
typedef long long ll;
int gcd(int a, int b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
vector<ll> mnp(1e5 + 1, 1e15);
map<pair<int, int>, int> mp;
void dfs(int u, int p, vector<vector<int>> &df, vector<int> vis, ll cost) {
// cout<<u<<end... | #include <bits/stdc++.h>
using namespace std;
#define nl "\n"
typedef long long ll;
int gcd(int a, int b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
vector<ll> mnp(1e5 + 1, 1e15);
map<pair<int, int>, int> mp;
void dfs(int u, int p, vector<vector<int>> &df, vector<int> vis, ll cost) {
// cout<<u<<end... | [["-", 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 | 227 |
#include <bits/stdc++.h>
using namespace std;
#define M (int)1e9
#define pi 3.1415926536
#define all(a) a.begin(), a.end()
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define M (int)1e9
#define pi 3.1415926536
#define all(a) a.begin(), a.end()
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | [["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 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 | 1,423 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int factorial(int n);
int factorial(int n) {
if (n == 1) {
return 1;
} else {
return n * factorial(n - 1);
}
}
bool is_prime(ll n) {
// Assumes that n is a positive natural number
// We know 1 is not a prime number
if (n == 1) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int factorial(int n);
int factorial(int n) {
if (n == 1) {
return 1;
} else {
return n * factorial(n - 1);
}
}
bool is_prime(ll n) {
// Assumes that n is a positive natural number
// We know 1 is not a prime number
if (n == 1) {
... | [["+", 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 | 408 |
<?php
fscanf(STDIN, "%s", $n);
$sum = 0;
foreach (preg_split('//u', $n, -1, PREG_SPLIT_NO_EMPTY) as $i) {
$sum += $i;
}
echo (($sum % 9 === 0) ? 'Yes' : 'no') . "\n"; | <?php
fscanf(STDIN, "%s", $n);
$sum = 0;
foreach (preg_split('//u', $n, -1, PREG_SPLIT_NO_EMPTY) as $i) {
$sum += (int)$i;
}
echo (($sum % 9 === 0) ? 'Yes' : 'No') . "\n"; | [["+", 8, 9, 0, 1, 0, 564, 12, 74, 0, 24], ["+", 8, 9, 0, 1, 0, 564, 12, 74, 39, 615], ["+", 8, 9, 0, 1, 0, 564, 12, 74, 0, 25], ["-", 0, 16, 31, 23, 0, 41, 75, 557, 0, 610], ["+", 0, 16, 31, 23, 0, 41, 75, 557, 0, 610]] | 6 | 70 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < s.size(); i++) {
ans += (ll)(s[i] - '0');
}
if (ans % 9 == 0) {
cout << "YES\n";
} else {
cout << "NO\n";
}
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < s.size(); i++) {
ans += (ll)(s[i] - '0');
}
if (ans % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\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 | 90 |
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
struct _IO {
_IO() {
ios::sync_with_stdio(0);
cin.tie(0);
}
} _io;
typedef long long ll;
typedef long double db;
int main() {
string str;
cin >> str;
int len = (int)str.size();
int sum = 0;
for (int ... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
struct _IO {
_IO() {
ios::sync_with_stdio(0);
cin.tie(0);
}
} _io;
typedef long long ll;
typedef long double db;
int main() {
string str;
cin >> str;
int len = (int)str.size();
int sum = 0;
for (int ... | [["-", 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 | 131 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const ll INF = 1e18;
const ld PI = acos((ld)-1);
template <class T> inline void array_input(T a[], size_t n) {
for (size_t i = 0; i < ... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const ll INF = 1e18;
const ld PI = acos((ld)-1);
template <class T> inline void array_input(T a[], size_t n) {
for (size_t i = 0; i < ... | [["-", 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 | 366 |
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
#define iof \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout);
#define io ... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
#define iof \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout);
#define io ... | [["-", 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 | 223 |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | [["-", 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 | 421 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
char str[maxn];
int main() {
scanf("%s", str);
int ans = 0;
for (int i = 0; str[i]; i++)
ans = ans * 10 + str[i] - '0';
if (ans % 9 == 0)
printf("Yes\n");
else
printf("No\n");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
char str[maxn];
int main() {
scanf("%s", str);
int ans = 0;
for (int i = 0; str[i]; i++)
ans += str[i] - '0';
if (ans % 9 == 0)
printf("Yes\n");
else
printf("No\n");
return 0;
} | [["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 32], ["-", 0, 11, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 11, 12, 16, 31, 16, 31, 16, 17, 48], ["-", 0, 11, 12, 16, 31, 16, 31, 16, 12, 13], ["-", 8, 1, 0, 11, 12, 16, 31, 16, 17, 72], ["+", 8, 9, 0, 7, 8, 1, 0, 11, 17, 107]] | 1 | 96 |
// package Div2_655;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char c... | // package Div2_655;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char c... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20]] | 3 | 160 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define pf printf
#define ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define pf printf
#define ... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 423 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
string N;
cin >> N;
int sum = 0;
for (auto v : N) {
sum += (int)v;
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
string N;
cin >> N;
int sum = 0;
for (auto v : N) {
sum += (int)v - 48;
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 70 |
s=list(input())
ans=0
for i in s:
k=int(i)
ans+=k
if k%9==0:
print("Yes")
else:
print("No")
| s=list(input())
ans=0
for i in s:
k=int(i)
ans+=k
if ans%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 | 46 |
#include "string"
#include <iostream>
using namespace std;
int main() {
string in;
cin >> in;
long long sum = 0;
for (int i = 0; i < in.size(); ++i) {
sum += in[i] - '0';
}
if (sum % 9 == 0) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
| #include "string"
#include <iostream>
using namespace std;
int main() {
string in;
cin >> in;
long long sum = 0;
for (int i = 0; i < in.size(); ++i) {
sum += in[i] - '0';
}
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 | 89 |
n = list(input())
a = 0
for i in range(len(n)):
a += int(i)
if a % 9 == 0:
print("Yes")
else:
print("No") | n = list(input())
a = 0
for i in range(len(n)):
a += int(n[i])
if a % 9 == 0:
print("Yes")
else:
print("No")
| [["+", 0, 677, 12, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 73]] | 5 | 49 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define F first
#define S second
using namespace std;
int main() {
string s;
cin >> s;
ll sum = 0;
for (ll i = 0; i < s.size(); i++)
sum += s[i] - '0';
if (sum % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define F first
#define S second
using namespace std;
int main() {
string s;
cin >> s;
ll sum = 0;
for (ll i = 0; i < s.size(); i++)
sum += s[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 | 90 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define vll vector<ll>
#define vvll vector<vll>
#define mll map<ll, ll>
#define f(i, m, n) for (i = m; i < n; i++)
#define ee endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define take(v, n) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define vll vector<ll>
#define vvll vector<vll>
#define mll map<ll, ll>
#define f(i, m, n) for (i = m; i < n; i++)
#define ee endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define take(v, n) ... | [["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 335 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ppb pop_back
#define vll vector<ll>
#define vi vector<int>
#define endl "\n"
const ll INF = 1000000007;
/*
const ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define ppb pop_back
#define vll vector<ll>
#define vi vector<int>
#define endl "\n"
const ll INF = 1000000007;
/*
const ... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["-", 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 | 140 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
int sum, i;
cin >> s;
sum = 0;
for (i = 0; i < (int)s.size(); i++)
sum += s[i] - '0';
if (sum % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
int sum, i;
cin >> s;
sum = 0;
for (i = 0; i < (int)s.size(); i++)
sum += s[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 | 88 |
#include <bits/stdc++.h>
#define rei register int
using namespace std;
const int maxn = 200010;
char s[maxn];
int main() {
scanf("%s", s + 1);
int lens = strlen(s + 1);
int cnt(0);
for (rei i = 1; i <= lens; ++i)
cnt = cnt + s[i] - '0';
// cerr <<
if (cnt % 9 == 0)
puts("YES");
else
puts("NO")... | #include <bits/stdc++.h>
#define rei register int
using namespace std;
const int maxn = 200010;
char s[maxn];
int main() {
scanf("%s", s + 1);
int lens = strlen(s + 1);
int cnt(0);
for (rei i = 1; i <= lens; ++i)
cnt = cnt + s[i] - '0';
// cerr <<
if (cnt % 9 == 0)
puts("Yes");
else
puts("No")... | [["-", 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 | 108 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define endl "\n"
#define INT long long int
using namespace std;
int main() {
ios::sync_with_stdio(false);
int i, a = 0;
string S;
cin >> S;
for (i = 0; i < S.size(); i++) {
a = (a + S[i] - '0') % 9;
}
if (a == 0)
cout <... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define endl "\n"
#define INT long long int
using namespace std;
int main() {
ios::sync_with_stdio(false);
int i, a = 0;
string S;
cin >> S;
for (i = 0; i < S.size(); i++) {
a = (a + S[i] - '0') % 9;
}
if (a == 0)
cout <... | [["-", 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 | 104 |
#include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll A, ll ... | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll A, ll ... | [["-", 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 | 670 |
n = input()
lst = list(n)
count = 0
for i in lst:
count += int(i)
if count == 0:
print('No')
elif count % 9 == 0:
print('Yes')
else:
print('No') | n = input()
lst = list(n)
count = 0
for i in lst:
count += int(i)
if count == 0:
print('Yes')
elif count % 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 | 57 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define vi vector<int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define vi vector<int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define endl "\n"
#define fast \
ios_base::sync_with_stdio(false); ... | [["-", 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 | 119 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
// ll n,x,t;
// cin>>n>>x>>t;
string s;
cin >> s;
ll sum = 0;
for (int i = 0; i < s.length(); i++)
sum = (sum % 9 + (s[i] - '0')) % 9;
if (sum)
cout << "NO" << endl;
else
cout << "YES" << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
// ll n,x,t;
// cin>>n>>x>>t;
string s;
cin >> s;
ll sum = 0;
for (int i = 0; i < s.length(); i++)
sum = (sum % 9 + (s[i] - '0')) % 9;
if (sum)
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 | 89 |
#include <cstdio>
#include <iostream>
using namespace std;
long long sum;
string s;
int main() {
cin >> s;
for (int i = 0; i < s.length(); i++) {
sum += s[i] - '9';
}
if (sum % 9 == 0) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
long long sum;
string s;
int main() {
cin >> s;
for (int i = 0; i < s.length(); i++) {
sum += s[i] - '9';
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 88 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string str;
cin >> str;
ll k = 0;
for (ll i = 0; str[i] != '\0'; i++) {
k += str[i] + '0';
}
if (k % 9 == 0)
cout << "Yes";
else
cout << "No";
cout << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string str;
cin >> str;
ll k = 0;
for (ll i = 0; str[i] != '\0'; i++) {
k += str[i] - '0';
}
if (k % 9 == 0)
cout << "Yes";
else
cout << "No";
cout << endl;
}
| [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 84 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int main(void) {
string N;
cin >> N;
ll ans = 0;
FOR(i, 0, N.length()) { ans += i + '0'; }
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "N... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int main(void) {
string N;
cin >> N;
ll ans = 0;
FOR(i, 0, N.length()) { ans += N[i] - '0'; }
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout <<... | [["+", 0, 1, 0, 11, 12, 16, 31, 69, 28, 22], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 70], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 73], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 99 |
#include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define int long ... | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define int long ... | [["-", 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 | 154 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
long long int num = 0;
for (int i = 0; i < (int)(N.length()); i++) {
int keta = N.at(i) - '0';
num += keta;
}
if (num % 9 == 0) {
cout << "yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
long long int num = 0;
for (int i = 0; i < (int)(N.length()); i++) {
int keta = N.at(i) - '0';
num += keta;
}
if (num % 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 | 98 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String x = sc.next();
int n = 0;
for (int i = 0; i < x.length(); i++) {
n += Character.forDigit(x.charAt(i), 10);
}
if (n % 9 == 0) {
System.out.println("Yes"... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String x = sc.next();
int n = 0;
for (int i = 0; i < x.length(); i++) {
n += Character.getNumericValue(x.charAt(i));
}
if (n % 9 == 0) {
System.out.println("Y... | [["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 21], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 499]] | 3 | 126 |
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
pu... | import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
pu... | [["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499]] | 3 | 206 |
#include <iostream>
#include <string.h>
using namespace std;
int gcd(int a, int b) {
if (!b)
return a;
else
return gcd(b, a % b);
}
/*int n,q,ara[200001],st[800004],a,b,mx=2000000000;
void build(int si,int ss,int se)
{
if(ss==se){
st[si]=ara[ss];
return;
}
int mid=(ss+se)/2;
... | #include <iostream>
#include <string.h>
using namespace std;
int gcd(int a, int b) {
if (!b)
return a;
else
return gcd(b, a % b);
}
/*int n,q,ara[200001],st[800004],a,b,mx=2000000000;
void build(int si,int ss,int se)
{
if(ss==se){
st[si]=ara[ss];
return;
}
int mid=(ss+se)/2;
... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 113 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int a = 0;
for (int i = 0; i < s.size(); i++) {
a += (s[i] - 48);
}
if (a % 9 == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int a = 0;
for (int i = 0; i < s.size(); i++) {
a += (s[i] - 48);
}
if (a % 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 | 80 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void solve() {
string s;
cin >> s;
ll sum = 0;
for (char c : s) {
sum += (c - '0');
}
if (sum % 9 == 0) {
cout << "YES\n";
} else {
cout << "NO\n";
}
}
int main() {
ios::sync_with_stdio(0);
cin.... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void solve() {
string s;
cin >> s;
ll sum = 0;
for (char c : s) {
sum += (c - '0');
}
if (sum % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
}
int main() {
ios::sync_with_stdio(0);
cin.... | [["-", 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 | 129 |
n=input()
s=0
for i in range(len(n)):
s+=int(n[0])
s%=9
if s==0:
print('Yes')
else:
print('No') | n=input()
s=0
for i in range(len(n)):
s+=int(n[i])
s%=9
if s==0:
print('Yes')
else:
print('No') | [["-", 0, 677, 12, 652, 3, 4, 0, 206, 206, 612], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 206, 22]] | 5 | 50 |
#include "bits/stdc++.h"
using namespace std;
int main() {
int ans = 0;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
ans += s.at(i);
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int ans = 0;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
ans += s.at(i) - 48;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 80 |
n = str(input())
ans = 0
for i in range(len(n)):
ans = (ans + int(ord(i) - ord('0'))) % 9
if ans: print ("No")
else: print("Yes")
| n = str(input())
ans = 0
for i in range(len(n)):
ans = (ans + ord(n[i]) - ord('0')) % 9
if ans: print("No")
else: print("Yes") | [["-", 12, 657, 31, 23, 0, 657, 12, 652, 63, 22], ["-", 31, 23, 0, 657, 12, 652, 3, 4, 0, 24], ["+", 31, 657, 12, 652, 3, 4, 0, 206, 51, 22], ["+", 31, 657, 12, 652, 3, 4, 0, 206, 0, 70], ["+", 31, 657, 12, 652, 3, 4, 0, 206, 0, 73], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\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 | 81 |
N = int(input())
temp = 0
for x in str(N):
temp += int(x)
if temp%9==0:
ans = "yes"
else:
ans = "No"
print(ans) | N = int(input())
temp = 0
for x in str(N):
temp += int(x)
if temp%9==0:
ans = "Yes"
else:
ans = "No"
print(ans) | [["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 48 |
import sys
input = sys.stdin.readline
#a,b,c = list(map(int,input().split()))
a = list(input())
ans = 0
for dig in a:
ans += int(dig)
if ans % 9 ==0:
print('Yes')
else:
print('No') | import sys
input = sys.stdin.readline
#a,b,c = list(map(int,input().split()))
a = list(input().rstrip())
ans = 0
for dig in a:
ans += int(dig)
#print(ans)
if ans % 9 ==0:
print('Yes')
else:
print('No') | [["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 53 |
// Problem B
#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
#define MAXN 300000
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long int... | // Problem B
#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
#define MAXN 300000
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long int... | [["-", 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 | 135 |
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define inf 1000000000000000000
#define N 1000000007
#define speed \
ios_base::sync_with_stdio(0); ... | //#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int long long
#define x first
#define y second
#define inf 1000000000000000000
#define N 1000000007
#define speed \
ios_base::sync_with_stdio(0); ... | [["-", 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 | 200 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string N;
cin >> N;
int sum = 0;
int le = N.length();
for (int i = 0; i < le; i++) {
sum += N[i] - '0';
}
if (sum % 9 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
// * * ***** ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string N;
cin >> N;
int sum = 0;
int le = N.length();
for (int i = 0; i < le; i++) {
sum += N[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 | 107 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define deque vector
void Oli() {
string a;
cin >> a;
int s = 0;
for (int i = 0; i < a.size(); i++) {
s += (char)a[i] - 48;
}
if (s % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "NO";
}
}
int main() {
int times = ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define deque vector
void Oli() {
string a;
cin >> a;
int s = 0;
for (int i = 0; i < a.size(); i++) {
s += (char)a[i] - 48;
}
if (s % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No";
}
}
int main() {
int times = ... | [["-", 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>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
int main() {
string N;
cin >> N;
ll ans = 0;
rep(i, 0, N.size()) {
ans += (N[0] - '0');
ans %= 9;
}
if (a... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
int main() {
string N;
cin >> N;
ll ans = 0;
rep(i, 0, N.size()) {
ans += (N[i] - '0');
ans = ans % 9;
//... | [["-", 12, 23, 0, 16, 31, 69, 341, 342, 0, 13], ["+", 12, 23, 0, 16, 31, 69, 341, 342, 0, 22], ["-", 8, 9, 0, 9, 0, 1, 0, 11, 17, 132], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 109]] | 1 | 103 |
import os
import heapq
import sys,threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10**5)
from io import BytesIO, IOBase
def gcd(a,b):
if b==0:
return a
else:
return gcd(b,a%b)
def power(x, p,m):
res = 1
while p:
if p ... | import os
import heapq
import sys,threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10**5)
from io import BytesIO, IOBase
def gcd(a,b):
if b==0:
return a
else:
return gcd(b,a%b)
def power(x, p,m):
res = 1
while p:
if p ... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 679 |
#include <bits/stdc++.h>
using namespace std;
/// ----------------------------- (Debug) ------------------------------
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<size... | #include <bits/stdc++.h>
using namespace std;
/// ----------------------------- (Debug) ------------------------------
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<size... | [["-", 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 | 655 |
import java.util.*;
public class Main {
static int gcd(int a, int b) { return b > 0 ? gcd(b, a % b) : a; }
static long mod = 1000000007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
long sum = 0;
for (int i = 0; i < S.length(); i++) {
... | import java.util.*;
public class Main {
static int gcd(int a, int b) { return b > 0 ? gcd(b, a % b) : a; }
static long mod = 1000000007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
long sum = 0;
for (int i = 0; i < S.length(); i++) {
... | [["+", 0, 11, 12, 492, 3, 4, 0, 16, 17, 33], ["+", 0, 11, 12, 492, 3, 4, 0, 16, 12, 252]] | 3 | 152 |
#include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pa;
typedef unsigned int uint;
typedef unsigned long long ull;
int main() {
int ans, n = 0;
string s;
cin >> s;
for (int i = 0; i < s.length(); i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pa;
typedef unsigned int uint;
typedef unsigned long long ull;
int main() {
int ans, n = 0;
string s;
cin >> s;
for (int i = 0; i < s.length(); i++) {
... | [["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]] | 1 | 124 |
//_nebula_
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
int t;
const int M = 1e9 + 7;
int factt(int n) {
int ans = 1;
for (int i = 1; i <= n; i++) {
ans *= i;
ans = ans % M;
}
return ans;
}
int max(int a, int b, int c) { return max(a, max(b, c)); }
int m... | //_nebula_
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
int t;
const int M = 1e9 + 7;
int factt(int n) {
int ans = 1;
for (int i = 1; i <= n; i++) {
ans *= i;
ans = ans % M;
}
return ans;
}
int max(int a, int b, int c) { return max(a, max(b, c)); }
int m... | [["-", 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 | 354 |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String N = s.next();
long count = 0;
for (int i = 0; i < N.length(); i++) {
count = count + (long)N.charAt(i);
}
if (coun... | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String N = s.next();
long count = 0;
for (int i = 0; i < N.length(); i++) {
count = count + (N.charAt(i) - 48);
}
if (cou... | [["-", 0, 11, 12, 16, 12, 74, 39, 506, 0, 96], ["-", 0, 1, 0, 11, 12, 16, 12, 74, 0, 25], ["+", 12, 23, 0, 16, 31, 492, 3, 4, 0, 25], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 499]] | 3 | 132 |
a = list(map(int, list(input())))
b = sum(a)
if b % 9 == 0 and b != 0:
print("Yes")
else:
print("No") | a = list(map(int, list(input())))
b = sum(a)
if b % 9 == 0:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 79], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 47 |
import sys
N = str(input())
n = list(map(int, N))
if sum(n) == 0:
print('No')
elif sum(n) % 9 != 0:
print('No')
else:
print('Yes')
| import sys
N = str(input())
n = list(map(int, N))
if sum(n) == 0:
print('Yes')
elif sum(n) % 9 != 0:
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 | 59 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define T \
int t; \
cin >> t; \
whil... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define T \
int t; \
cin >> t; \
whil... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 108 |
s = input()
sum=0
a = [int(c) for c in s]
for i in a:
sum+=i
print(sum)
if sum%9==0:
print("Yes")
else:
print("No") | s = input()
sum=0
a = [int(c) for c in s]
for i in a:
sum+=i
if sum%9==0:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 53 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pll = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, m, n) for (ll i = m; i < n; i++)
#define all(vec) vec.begin(), vec.end()
#define tmax(x, y, z) max((x), max((y), (z)))
#define tmin(x, y, z) min((x), min((y), (z)))
#... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pll = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, m, n) for (ll i = m; i < n; i++)
#define all(vec) vec.begin(), vec.end()
#define tmax(x, y, z) max((x), max((y), (z)))
#define tmin(x, y, z) min((x), min((y), (z)))
#... | [["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 458 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] n = sc.next().toCharArray();
long sum = 0;
for (int i = 0; i < n.length; i++) {
sum += (long)n[0];
}
if (sum % 9 == 0)
System.out.println("Yes");
else
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] n = sc.next().toCharArray();
long sum = 0;
for (int i = 0; i < n.length; i++) {
sum += (int)n[i] - 48;
}
if (sum % 9 == 0)
System.out.println("Yes");
el... | [["-", 0, 1, 0, 11, 12, 74, 39, 506, 0, 96], ["+", 0, 11, 12, 16, 31, 74, 39, 506, 0, 507], ["-", 0, 1, 0, 11, 12, 74, 51, 504, 71, 499], ["+", 0, 11, 12, 16, 31, 74, 51, 504, 71, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 12, 499]] | 3 | 114 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long int sum = 0, i;
for (i = 0; i < s.size(); i++) {
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;
long long int sum = 0, i, n;
for (i = 0; i < s.size(); i++) {
sum += (s[i] - '0');
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
}
| [["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 1, 0, 11, 12, 23, 0, 42, 0, 32], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33]] | 1 | 81 |
#include <bits/stdc++.h>
#define aio() \
do { \
std::ios::sync_with_stdio(0); \
std::cin.tie(0); ... | #include <bits/stdc++.h>
#define aio() \
do { \
std::ios::sync_with_stdio(0); \
std::cin.tie(0); ... | [["-", 0, 338, 8, 9, 0, 1, 0, 11, 17, 108], ["-", 0, 338, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 8, 9, 0, 338, 8, 9, 0, 1, 0, 35], ["-", 0, 338, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 84 |
// Bismillahir Rahmanir Raheem
//#include<bits/stdc++.h>
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define pb push_back
#de... | // Bismillahir Rahmanir Raheem
//#include<bits/stdc++.h>
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
#define pb push_back
#de... | [["-", 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 | 273 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(), v.end()
int main() {
string s;
cin >> s;
ll sum = 0;
int num = 0;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(), v.end()
int main() {
string s;
cin >> s;
ll sum = 0;
int num = 0;
... | [["+", 0, 1, 0, 11, 12, 74, 51, 23, 0, 24], ["+", 51, 23, 0, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 11, 12, 74, 51, 23, 0, 16, 17, 33], ["+", 12, 74, 51, 23, 0, 16, 12, 103, 0, 104], ["+", 12, 74, 51, 23, 0, 16, 12, 103, 0, 125]] | 1 | 119 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string str;
cin >> str;
int ans = 0;
for (int i = 0; i < str.length(); i++) {
char tmp = str[i];
ans += (int)tmp;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string str;
cin >> str;
int ans = 0;
for (int i = 0; i < str.length(); i++) {
char tmp = str[i];
ans += (int)tmp - 48;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 88 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
int t = 0;
for (int i = 0; i < n; i++)
t += (s[i] - '0');
if (t % 9 == 0)
cout << "YES\n";
else
cout << "NO\n";
return 0;
} | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
int t = 0;
for (int i = 0; i < n; i++)
t += (s[i] - '0');
if (t % 9 == 0)
cout << "Yes\n";
else
cout << "No\n";
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 | 86 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
String n = reader.next();
int total = 0;
for (int i = 0; i < n.length(); i++) {
total += Integer.parseInt("" + n.charAt(i));
}
if (total % 9 == 0) {
System.ou... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
String n = reader.next();
long total = 0;
for (int i = 0; i < n.length(); i++) {
total += Integer.parseInt("" + n.charAt(i));
}
if (total % 9 == 0) {
System.o... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 127 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
string s;
int main() {
cin >> s;
long long sm = 0;
for (int i = 0; i < s.size(); ++i)
sm += (int)(s[i] - '0');
if (sm % 9 == 0)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
string s;
int main() {
cin >> s;
long long sm = 0;
for (int i = 0; i < s.size(); ++i)
sm += (int)(s[i] - '0');
if (sm % 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 |
#include <bits/stdc++.h>
#include <ctime>
using namespace std;
#define ll long long
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#include <ctime>
using namespace std;
#define ll long long
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [["+", 12, 16, 31, 23, 0, 16, 31, 74, 0, 24], ["-", 31, 16, 31, 74, 51, 69, 341, 342, 0, 13], ["+", 0, 16, 31, 74, 51, 69, 341, 342, 0, 22], ["+", 31, 23, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 160 |
import sys
li = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : sys.stdin.readline().strip().split()
ni = lambda : int(sys.stdin.readline().strip())
nsi = lambda : sys.stdin.readline().strip()
from collections import defaultdict as df
import math
s=input()
sum=0
for i in s:
... | import sys
li = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : sys.stdin.readline().strip().split()
ni = lambda : int(sys.stdin.readline().strip())
nsi = lambda : sys.stdin.readline().strip()
from collections import defaultdict as df
import math
s=input()
sum=0
for i in s:
... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 132 |
import sys
input = sys.stdin.readline
I = lambda : list(map(int,input().split()))
n,=I()
if sum(n)%9==0:
print("Yes")
else:
print("No")
| import sys
input = sys.stdin.readline
I = lambda : list(map(int,input().split()))
n=I()
if sum(n)%9==0:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
long long n = 0;
for (int i = 0; i < s.size(); i++) {
n += s[i] - 48;
}
if (n % 9 == 0) {
cout << "YES\n";
} else {
cout << "NO\n";
}
return 0;
}
// * *... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
long long n = 0;
for (int i = 0; i < s.size(); i++) {
n += s[i] - 48;
}
if (n % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
return 0;
}
// * *... | [["-", 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 | 123 |
#include <bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define mod 1000000007ll
const ll maxn = 9e18;
using namespace std;
const ll maxsize = 100000009;
void solve() {
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < s.length(); ++i) {
ans += (int(s[i] - '0'));
}
if (ans % 9 == 0)
c... | #include <bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define mod 1000000007ll
const ll maxn = 9e18;
using namespace std;
const ll maxsize = 100000009;
void solve() {
string s;
cin >> s;
ll ans = 0;
for (int i = 0; i < s.length(); ++i) {
ans += (int(s[i] - '0'));
}
if (ans % 9 == 0)
c... | [["-", 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 | 152 |
/* competitive programming */
#include "bits/stdc++.h"
using namespace std;
/* using */
// long
using ll = long long;
using ld = long double;
// vector
using vi = vector<int>;
using vd = vector<double>;
using vll = vector<ll>;
using vld = vector<ld>;
using vs = vector<string>;
/* define */
// push_back系
#define pb(x)... | /* competitive programming */
#include "bits/stdc++.h"
using namespace std;
/* using */
// long
using ll = long long;
using ld = long double;
// vector
using vi = vector<int>;
using vd = vector<double>;
using vll = vector<ll>;
using vld = vector<ld>;
using vs = vector<string>;
/* define */
// push_back系
#define pb(x)... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 1,303 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
using... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
using... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 136 |
#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
int main() {
string s;
cin >> s;
ll kasu = 0;
for (ll i = 0; i < s.size(); i++) {
int a;
a = s[i] = '0';
kasu = (kasu + a) % 9;
}
if (kasu == 0) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;... | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
int main() {
string s;
cin >> s;
ll kasu = 0;
for (ll i = 0; i < s.size(); i++) {
int a;
a = s[i] - '0';
kasu = (kasu + a) % 9;
}
if (kasu == 0) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;... | [["-", 8, 9, 0, 1, 0, 11, 12, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char n[200010];
cin >> n;
int s = 0;
for (unsigned int i = 0; i < strlen(n); ++i)
s = s + n[i] - '0';
if (s % 9)
cout << "NO";
else
cout << "YES";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
char n[200010];
cin >> n;
int s = 0;
for (unsigned int i = 0; i < strlen(n); ++i)
s = s + n[i] - '0';
if (s % 9)
cout << "No";
else
cout << "Yes";
}
| [["-", 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 | 77 |
inputs = int(input())
if (inputs // 9) == 0:
print("Yes")
else:
print("No") | inputs = int(input())
if (inputs % 9) == 0:
print("Yes")
else:
print("No") | [["-", 0, 57, 15, 666, 0, 23, 0, 657, 17, 676], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 17, 109]] | 5 | 31 |
#include <bits/stdc++.h>
#define pii pair<int, int>
#define fi first
#define se second
#define int long long
#define pb push_back
#define mod 1000000007
#define pll pair<long long, long long>
using namespace std;
long long power(long long a, long long b) {
long long ans = 1;
while (b > 0) {
if (b & 1) {
a... | #include <bits/stdc++.h>
#define pii pair<int, int>
#define fi first
#define se second
#define int long long
#define pb push_back
#define mod 1000000007
#define pll pair<long long, long long>
using namespace std;
long long power(long long a, long long b) {
long long ans = 1;
while (b > 0) {
if (b & 1) {
a... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]] | 1 | 235 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000000 + 7)
using namespace std;
typedef long long ll;
const int MAX = 3000000;
long... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000000 + 7)
using namespace std;
typedef long long ll;
const int MAX = 3000000;
long... | [["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]] | 1 | 1,224 |
#include <bits/stdc++.h>
#define pb push_back
#define lli unsigned long long int
using namespace std;
int main() {
// your code goes here
string n;
cin >> n;
lli sum = 0;
while (n.length() > 0) {
sum += (int(n[n.length() - 1]) % 10);
n.pop_back();
}
if (sum % 9 == 0)
cout << "Yes\n";
else
... | #include <bits/stdc++.h>
#define pb push_back
#define lli unsigned long long int
using namespace std;
int main() {
// your code goes here
string n;
cin >> n;
lli sum = 0;
while (n.length() > 0) {
sum += ((n[n.length() - 1] - '0') % 10);
n.pop_back();
// cout<<n<<" "<<sum<<endl;
}
// cout<<sum... | [["-", 0, 11, 12, 23, 0, 16, 31, 2, 63, 40], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 31, 23, 0, 16, 12, 103, 0, 104], ["+", 0, 16, 31, 23, 0, 16, 12, 103, 0, 125]] | 1 | 95 |
num = 0
for i in range(len(N)):
num += int(N[i])
if num % 9 == 0:
print("Yes")
else:
print("No") | N = input()
num = 0
for i in range(len(N)):
num += int(N[i])
if num % 9 == 0:
print("Yes")
else:
print("No") | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 44 |
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef p... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef p... | [["+", 0, 7, 8, 1, 0, 11, 12, 74, 0, 24], ["+", 8, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["+", 0, 7, 8, 1, 0, 11, 12, 74, 0, 25], ["+", 8, 1, 0, 11, 12, 74, 51, 23, 0, 24], ["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 23, 0, 16, 31, 69, 341, 342, 0, 22], ["+", 8, 1, 0, 11, 12, 74, 51, 23, 0, 25]] | 1 | 159 |
N = input()
sum = 0
for i in range(len(N)):
sum += int(i)
if sum % 9 == 0:
print("Yes")
else:
print("No")
| N = input()
sum = 0
for i in N:
sum += int(i)
if sum % 9 == 0:
print("Yes")
else:
print("No")
| [["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["-", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25]] | 5 | 46 |
#include "bits/stdc++.h"
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPR(i, n) for (int i = (n); i >= 0; i--)
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define SORT(v, n) std::sort(v, v + n);
#define VSORT(v) std::sort(v.begin(), v.end());
... | #include "bits/stdc++.h"
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPR(i, n) for (int i = (n); i >= 0; i--)
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define SORT(v, n) std::sort(v, v + n);
#define VSORT(v) std::sort(v.begin(), v.end());
... | [["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 12, 2, 3, 4, 0, 16, 12, 103, 0, 104], ["+", 12, 2, 3, 4, 0, 16, 12, 103, 0, 125]] | 1 | 230 |
#define onlycc \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL)
#include <algorithm>
#include <iostream>
#include <string>
u... | #define onlycc \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL)
#include <algorithm>
#include <iostream>
#include <string>
u... | [["-", 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 | 94 |
n = input()
sum = 0
for i in range(len(n)):
sum += int(i)
if(sum%9 == 0):
print("Yes")
else:
print("No") | n = input()
sum = 0
for i in range(len(n)):
sum += int(n[i])
if(sum%9 == 0):
print("Yes")
else:
print("No") | [["+", 0, 677, 12, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 0, 73]] | 5 | 48 |
#x = int(input())
#A = list(map(int, input().split()))
#n, x, t = map(int, input().split())
n = input()
list_num = list(n)
list_num = [int(n) for n in list_num]
ans = sum(list_num)
if ans % 9 == 0:
print("Yes")
else:
print("NO") | #x = int(input())
#A = list(map(int, input().split()))
#n, x, t = map(int, input().split())
n = input()
list_num = list(n)
list_num = [int(n) for n in list_num]
ans = sum(list_num)
#print(list_num)
if ans % 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 | 53 |
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define Minf -1e9
#define scan(n) scanf("%lld", &n)
typedef long long ll;
const int maxn = 2 * 1e5 + 10;
const ll INF = 1e9 + 100;
... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define Minf -1e9
#define scan(n) scanf("%lld", &n)
typedef long long ll;
const int maxn = 2 * 1e5 + 10;
const ll INF = 1e9 + 100;
... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 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 | 151 |
#include <bits/stdc++.h>
using namespace std;
// int y[200000]={},z[200000]={};
int main() {
int cow = 0;
string a;
cin >> a;
for (int i = 0; a[i]; i++)
cow += a[i];
if (cow % 9)
cout << "No";
else
cout << "Yes";
}
| #include <bits/stdc++.h>
using namespace std;
// int y[200000]={},z[200000]={};
int main() {
int cow = 0;
string a;
cin >> a;
for (int i = 0; a[i]; i++)
cow += a[i] - '0';
if (cow % 9)
cout << "No";
else
cout << "Yes";
}
| [["+", 0, 7, 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 | 66 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.