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 |
|---|---|---|---|---|
#abc176b
N=input()
s=0
for i in range(len(N)):
s+=int(N[i])
print(s)
if s%9==0:
print('Yes')
else:
print('No')
| #abc176b
N=input()
s=0
for i in range(len(N)):
s+=int(N[i])
if s%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 | 54 |
#include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define forf(i, n) for (int i = 0;... | #include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define forf(i, n) for (int i = 0;... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 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]] | 1 | 125 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int mod = 0;
for (int i = 0; i < s.length(); i++) {
int a = (int)(s.charAt(i));
mod += a;
mod %= 9;
}
if (mod == 0) {
System.out.p... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int mod = 0;
for (int i = 0; i < s.length(); i++) {
int a = (int)(s.charAt(i)) - 48;
mod += a;
mod %= 9;
}
if (mod == 0) {
System.... | [["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 33], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499]] | 3 | 125 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int total = 0;
for (int i = 0; i < S.length(); i++) {
total += int(S[i]);
}
if (total % 9 == 0) {
cout << "Yes" << endl;
} else {
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int total = 0;
for (int i = 0; i < S.length(); i++) {
total += S[i] - '0';
}
if (total % 9 == 0) {
cout << "Yes" << endl;
} else {
... | [["-", 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 | 93 |
/*
ID: sstfmsc1
TASK: milk2
LANG: C++
*/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0); ... | /*
ID: sstfmsc1
TASK: milk2
LANG: C++
*/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0); ... | [["-", 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 | 130 |
#include <algorithm>
#include <bits/stdc++.h>
#include <vector>
using namespace std;
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < n.size(); i++) {
sum += n[i];
}
if (sum % 9 == 0) {
cout << "Yes"
<< "\n";
}
... | #include <algorithm>
#include <bits/stdc++.h>
#include <vector>
using namespace std;
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
string n;
cin >> n;
int sum = 0;
for (int i = 0; i < n.size(); i++) {
sum += n[i] - 48;
}
if (sum % 9 == 0) {
cout << "Yes"
<< "\n";
... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 105 |
n = input()
def solve1(n: int) -> str:
k = 0
for i in range(len(n)):
k += int(n[i])
if k % 9 == 0:
return "Yes"
else:
return "No"
def solve2(n: int) -> str:
if n % 9 == 0:
return "Yes"
else:
return "No"
solve2(n)
| n = int(input())
def solve1(n: int) -> str:
k = 0
for i in range(len(n)):
k += int(n[i])
if k % 9 == 0:
return "Yes"
else:
return "No"
def solve2(n: int) -> str:
if n % 9 == 0:
return "Yes"
else:
return "No"
print(solve2(n))
| [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 86 |
#include <stdio.h>
#include <string.h>
int main(void) {
char n[200001];
scanf("%s", n);
int i = strlen(n);
int s = 0;
for (int j = 0; j < s; j++) {
s += n[j] - 48;
}
if (s % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | #include <stdio.h>
#include <string.h>
int main(void) {
char n[200001];
scanf("%s", n);
int i = strlen(n);
int s = 0;
for (int j = 0; j < i; j++) {
s += n[j] - 48;
}
if (s % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 0 | 96 |
/*
submission # - User: herp_sy
https://atcoder.jp/contests/
coding: utf-8
lang: C++ (GCC 9.2.1)
*/
#include <bits/stdc++.h>
using namespace std;
// utility of stdin,stdout
#define _CRT_SECURE_NO_WARNINGS
#define OUT cout <<
#define BR << endl
#define RET return 0
#define TLong long l... | /*
submission # - User: herp_sy
https://atcoder.jp/contests/
coding: utf-8
lang: C++ (GCC 9.2.1)
*/
#include <bits/stdc++.h>
using namespace std;
// utility of stdin,stdout
#define _CRT_SECURE_NO_WARNINGS
#define OUT cout <<
#define BR << endl
#define RET return 0
#define TLong long l... | [["-", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 23, 0, 16, 12, 103, 0, 104], ["+", 0, 11, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 8, 9, 0, 1, 0, 11, 12, 23, 0, 25]] | 1 | 553 |
x = int(input())
result = sum(list(map(int, str(x))))
if result % 9 == 0:
print("YES")
else:
print("NO") | x = int(input())
result = sum(list(map(int, str(x))))
if result % 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 | 46 |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
#define mod 1000000007
#define all(x) (x).begin(), (x).end()
void solve() {
string n;
cin >> n;
int sum = 0;
for (char c : n)
sum = c - '0';
if (sum % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
}
int ma... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
#define mod 1000000007
#define all(x) (x).begin(), (x).end()
void solve() {
string n;
cin >> n;
int sum = 0;
for (char c : n)
sum += c - '0';
if (sum % 9 == 0) {
cout << "Yes\n";
} else {
cout << "No\n";
}
}
int m... | [["-", 8, 9, 0, 338, 8, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 338, 8, 1, 0, 11, 17, 107]] | 1 | 108 |
N = input()
for i in range(10):
cnt += i * N.count(str(i))
print("Yes" if cnt % 9 == 0 else "No") | N = input()
cnt = 0
for i in range(10):
cnt += i * N.count(str(i))
print("Yes" if cnt % 9 == 0 else "No") | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 42 |
#include <bits/stdc++.h>
#define sc(x) scanf("%d", &x)
#define sc2(x, y) scanf("%d%d", &x, &y)
#define scs(x) scanf("%s", x)
#define pr(x) printf("%d", x)
#define prn(x) printf("%d\n", x)
#define memc(x, y) memcpy(&x, &y, sizeof(x))
#define mems(x, y) memset(x, y, sizeof(x))
#define fli() freopen("in.txt", "r", stdin)
... | #include <bits/stdc++.h>
#define sc(x) scanf("%d", &x)
#define sc2(x, y) scanf("%d%d", &x, &y)
#define scs(x) scanf("%s", x)
#define pr(x) printf("%d", x)
#define prn(x) printf("%d\n", x)
#define memc(x, y) memcpy(&x, &y, sizeof(x))
#define mems(x, y) memset(x, y, sizeof(x))
#define fli() freopen("in.txt", "r", stdin)
... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 11, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 11, 12, 23, 0, 16, 12, 103, 0, 125]] | 1 | 270 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define PRINT(x, y) cout << "Case #" << (int)x << ": " << (int)(y) << endl;
ll exp(ll x, ll y) {
if (y == 0)
return 1;
if (y == 1)
return x;
if (y % 2 == 0)
return exp(x, y / 2) * exp(x, y / 2);
else
return x * exp(x, y / 2) * e... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define PRINT(x, y) cout << "Case #" << (int)x << ": " << (int)(y) << endl;
ll exp(ll x, ll y) {
if (y == 0)
return 1;
if (y == 1)
return x;
if (y % 2 == 0)
return exp(x, y / 2) * exp(x, y / 2);
else
return x * exp(x, y / 2) * e... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 408 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Vec = vector<int>;
int mod = 1000000007;
bool IsPrime(int num) {
if (num < 2)
return false;
else if (num == 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Vec = vector<int>;
int mod = 1000000007;
bool IsPrime(int num) {
if (num < 2)
return false;
else if (num == 2)
return true;
else if (num % 2 == 0)
return false;
double sqrtNum = sqrt(num);
for (int... | [["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 70], ["+", 0, 11, 12, 16, 31, 2, 63, 118, 17, 131], ["+", 0, 11, 12, 16, 31, 2, 63, 118, 119, 120], ["+", 0, 11, 12, 16, 31, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 73], ["+", 0, 11, 12, 16, 31, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8,... | 1 | 192 |
def solve(s):
suma = 0
for x in s:
suma += int(x)
if suma % 9 == 0:
return True
return False
s = input()
x = solve(s)
if x == True: print("YES")
else: print("NO") | def solve(s):
suma = 0
for x in s:
suma += int(x)
if suma % 9 == 0:
return True
return False
s = input()
x = solve(s)
if x == True: 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 | 61 |
#include <stdio.h>
//#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
#define MAXSIZE 100001
int main(int argc, char *argv[]) {
// char res[4];
char N[MAXSIZE];
scanf("%s", N);
int i = 0;
int sum = 0;
for (i = 0... | #include <stdio.h>
//#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
#define MAXSIZE 200001
int main(int argc, char *argv[]) {
// char res[4];
char N[MAXSIZE];
scanf("%s", N);
int i = 0;
int sum = 0;
for (i = 0... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 155 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define v(x) vector<x>
#define pb push_back
#define mp make_pair
#define maxint 1e18
#define mint -1e18
int main() {
string s;
cin >> s;
ll x = 0, n = s.size();
for (int i = 0; i < n; i++) {
x += (s[i] - '0');
} // cout<<x<<endl;
cout ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define v(x) vector<x>
#define pb push_back
#define mp make_pair
#define maxint 1e18
#define mint -1e18
int main() {
string s;
cin >> s;
ll x = 0, n = s.size();
for (int i = 0; i < n; i++) {
x += (s[i] - '0');
}
cout << (x % 9 == 0 ? "... | [["-", 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 | 112 |
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define forn(n1, n2) for (ll i = n1; i < n2; i++)
#define w(t) \
ll t; \
cin >> t; ... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define forn(n1, n2) for (ll i = n1; i < n2; i++)
#define w(t) \
ll t; \
cin >> t; ... | [["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 45], ["-", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["-", 0, 1, 0, 11, 12, 16, 12, 103, 0, 125], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46], ["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, ... | 1 | 226 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
int main() {
string s;
cin >> s;
long long i = 0;
long long sum = 0;
while (s[i] != '\0') {
sum += (s[i] - '0');
i++;
}
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "NO" << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
int main() {
string s;
cin >> s;
long long i = 0;
long long sum = 0;
while (s[i] != '\0') {
sum += (s[i] - '0');
i++;
}
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 | 91 |
q=(input())
A=(list(q))
S=map((lambda x: int(x)),A)
W=sum(S)
if W%9==0:
print('Yes')
else:
print('NO')
| q=(input())
A=(list(q))
S=map((lambda x: int(x)),A)
W=sum(S)
if W%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 | 58 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func nextLine(r *bufio.Reader) string {
var buf []byte
for {
line, isPrefix, err := r.ReadLine()
if err != nil {
panic(err)
}
buf = append(buf, line...)
if !isPrefix {
break
}
}
return string(buf)
}
func nextStr(s *bufio.Scanner) string {... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func nextLine(r *bufio.Reader) string {
var buf []byte
for {
line, isPrefix, err := r.ReadLine()
if err != nil {
panic(err)
}
buf = append(buf, line...)
if !isPrefix {
break
}
}
return string(buf)
}
func nextStr(s *bufio.Scanner) string {... | [["+", 12, 432, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 12, 432, 0, 2, 3, 4, 0, 16, 12, 457]] | 7 | 332 |
// vinay
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
const ll mod = 1e9 + 7;
#define flash \
ios_base::sync_with_stdio(false); \
cin.tie(0);
// C++ program to print all
// permutati... | // vinay
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
const ll mod = 1e9 + 7;
#define flash \
ios_base::sync_with_stdio(false); \
cin.tie(0);
// C++ program to print all
// permutati... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["+", 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 | 117 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String strn = sc.next();
sc.close();
String str[] = strn.split("");
int sum = 0;
for (int i = 0; i < strn.length(); i++) {
sum += Integer.parseInt(str[i]);
}
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String strn = sc.next();
sc.close();
String str[] = strn.split("");
int sum = 0;
for (int i = 0; i < strn.length(); i++) {
sum += Integer.parseInt(str[i]);
}
... | [["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22]] | 3 | 132 |
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
print("Yes")
else:
print("No") | s = input()
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 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 | 39 |
N=int(input())
S=str(N)
A=len(S)
M=0
for i in range(N):
M=M+int(S[i])
if M%9==0:
print("Yes")
else:
print("No") | N=int(input())
S=str(N)
A=len(S)
M=0
for i in range(A):
M=M+int(S[i])
if M%9==0:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 63 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner stdIn = new Scanner(System.in);
String N = stdIn.nextLine();
int sum = 0;
for (int i = 0; i < N.length() - 1; i++) {
sum += Integer.parseInt(N.substring(i, i + 1));
}
if (sum % 9 == 0) {
... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner stdIn = new Scanner(System.in);
String N = stdIn.nextLine();
int sum = 0;
for (int i = 0; i < N.length(); i++) {
sum += Integer.parseInt(N.substring(i, i + 1));
}
if (sum % 9 == 0) {
Sys... | [["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 124 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define ocut cout
#define ouct cout
#define itn int
struct Union {
vector<ll> par;
Union(ll a) { par = vector<ll>(a, -1); }
ll find(ll a) {
if (par[a] < 0) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define ocut cout
#define ouct cout
#define itn int
struct Union {
vector<ll> par;
Union(ll a) { par = vector<ll>(a, -1); }
ll find(ll a) {
if (par[a] < 0) {
... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 479 |
n = str(input())
if n%9 == 0:
print("Yes")
else:
print("No") | n = int(input())
if n%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 | 29 |
#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;
int sum = 0;
rep(i, N.size()) sum = N[i] - '0';
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #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;
int sum = 0;
rep(i, N.size()) sum += N[i] - '0';
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107]] | 1 | 87 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string x;
cin >> x;
if (x[0] == '0') {
cout << "Yes" << endl;
return 0;
}
int sum = 0;
for (int i = 0; i < x.length(); ++i) {
sum += x[i];
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
std::cout << "No" << std::... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string x;
cin >> x;
if (x[0] == '0') {
cout << "Yes" << endl;
return 0;
}
int sum = 0;
for (int i = 0; i < x.length(); ++i) {
sum += x[i] - '0';
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
std::cout << "No" <<... | [["+", 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 | 112 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (a); i > (b); i--)
typedef long long ll;
using namespace std;
typedef double dd;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
ll x = 0;
for (int i = 0; i < ... |
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (a); i > (b); i--)
typedef long long ll;
using namespace std;
typedef double dd;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
ll x = 0;
for (int i = 0; i < ... | [["-", 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 | 138 |
N = input()
list = []
for i in range(len(N)):
list.append(int(i))
if sum(list) %9 ==0:
print('Yes')
else:
print('No')
| N = input()
list = []
for i in range(len(N)):
list.append(int(N[i]))
if sum(list) % 9 ==0:
print('Yes')
else:
print('No')
| [["+", 3, 4, 0, 652, 3, 4, 0, 206, 51, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 3, 4, 0, 652, 3, 4, 0, 206, 0, 73]] | 5 | 53 |
n = input()
s = 0
for i in range(len(n)):
s += int(n[-1])
print('Yes' if s % 9 == 0 else 'No') | n = input()
s = 0
for i in range(len(n)):
s += int(n[i])
print('Yes' if s % 9 == 0 else 'No') | [["-", 12, 652, 3, 4, 0, 206, 206, 664, 17, 33], ["-", 12, 652, 3, 4, 0, 206, 206, 664, 28, 612], ["+", 0, 677, 12, 652, 3, 4, 0, 206, 206, 22]] | 5 | 45 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int count = 0;
for (char c : a) {
count += int(c);
}
if (count % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int count = 0;
for (char c : a) {
count += int(c) - 48;
}
if (count % 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 | 65 |
n=int(input())
s=str(n)
array = list(map(int,s))
if array%9==0:
print("Yes")
else:
print("No") | n=int(input())
s=str(n)
array = list(map(int,s))
if sum(array)%9==0:
print("Yes")
else:
print("No") | [["+", 0, 57, 15, 666, 0, 657, 31, 652, 63, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25]] | 5 | 46 |
/*
/\ In The Name Of ALLAH /\
Author : Jawahiir Nabhan
*/
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
ll sum = 0;
for (int i = 0; i < s.size(); i++)
sum += (s[i] - '0');
if (sum && sum % 9 == 0)
cout << "Yes\n";
e... | /*
/\ In The Name Of ALLAH /\
Author : Jawahiir Nabhan
*/
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
ll sum = 0;
for (int i = 0; i < s.size(); i++)
sum += (s[i] - '0');
if (sum % 9 == 0)
cout << "Yes\n";
else
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]] | 1 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int nl = n.size(), cnt = 0;
for (int i = 0; i < nl; i++) {
cnt += (int)n.at(i);
cnt %= 9;
}
if (cnt > 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int nl = n.size(), cnt = 0;
for (int i = 0; i < nl; i++) {
cnt += (int)n.at(i) - 48;
cnt %= 9;
}
if (cnt > 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
}
| [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 94 |
#include <stdio.h>
int main() {
int c;
int sum;
while ((c = getchar()) != EOF) {
sum += c - '0';
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
} | #include <stdio.h>
int main() {
int c;
int total;
while ((c = getchar()) != '\n') {
total += c - '0';
}
if (total % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 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, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 15, 23... | 0 | 65 |
n = int(input())
if n//9:
print('Yes')
else:
print('No') | n = int(input())
if n % 9 == 0:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]] | 5 | 27 |
n = int(input())
if n/9 == n//9:
print("Yes")
else:
print("No") | n = int(input())
if n%9 ==0:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]] | 5 | 31 |
n = list(input())
print("Yes" if sum(n) % 9 == 0 else "No") | n = list(map(int, input()))
print("Yes" if sum(n) % 9 == 0 else "No") | [["+", 0, 662, 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, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 27 |
n=input()
k=0
for m in n:
k += int(m) % 9
print("Yes" if k == 0 else "No") | n=input()
k=0
for m in n:
k += int(m) % 9
print("Yes" if k % 9 == 0 else "No")
| [["+", 3, 4, 0, 41, 0, 666, 0, 657, 17, 109], ["+", 3, 4, 0, 41, 0, 666, 0, 657, 12, 612]] | 5 | 35 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int ans = 0;
for (int i = 0; i < n.length(); i++) {
ans += (int)n[i];
ans %= 9;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int ans = 0;
for (int i = 0; i < n.length(); i++) {
ans += n[i] - '0';
ans %= 9;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["-", 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 | 86 |
/* COMPETITIVE PROGRAMMING C++ TEMPLATE */
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define all(x) x.begin(), x.e... | /* COMPETITIVE PROGRAMMING C++ TEMPLATE */
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define all(x) x.begin(), x.e... | [["-", 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 | 182 |
#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.at(i);
}
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 += (int)N.at(i) - 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 | 85 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[200010];
int len, sum = 0, i = 0;
scanf("%s", s);
len = strlen(s);
for (i = 0; i < len; i++)
sum += s[i] - '0';
if (sum % 9 == 0)
printf("YES");
else
printf("NO");
return 0;
}
| #include <stdio.h>
#include <string.h>
int main(void) {
char s[200010];
int len, sum = 0, i = 0;
scanf("%s", s);
len = strlen(s);
for (i = 0; i < len; i++)
sum += s[i] - '0';
if (sum % 9 == 0)
printf("Yes");
else
printf("No");
return 0;
}
| [["-", 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]] | 0 | 94 |
'''
Online Python Compiler.
Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.
'''
ip=list(input())
sum=0
for i in ip:
sum+=int(i)
if sum%9==0:
print('YES')
else:
print('NO') | '''
Online Python Compiler.
Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.
'''
ip=list(input())
sum=0
for i in ip:
sum+=int(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 | 46 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
using namespace std;
typedef long long ll;
int main() {
string n;
cin >> n;
int sum = 0;
rep(i, n.size()) sum += n[i];
if (sum % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
using namespace std;
typedef long long ll;
int main() {
string n;
cin >> n;
int sum = 0;
rep(i, n.size()) 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 | 79 |
/* C++ */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = ll(0); i < ll(n); i++)
#define Rep(i, n) for (ll i = ll(1); i < ll(n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | /* C++ */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = ll(0); i < ll(n); i++)
#define Rep(i, n) for (ll i = ll(1); i < ll(n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | [["+", 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 | 1,291 |
#include <bits/stdc++.h>
#define nl '\n'
using namespace std;
typedef long long ll;
void solve() {
string N;
cin >> N;
ll sum = 0;
for (char n : N)
sum += (n - '0');
cout << (sum % 9 == 0 ? "YES" : "NO");
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
// int t;
// cin >> t;
// ... | #include <bits/stdc++.h>
#define nl '\n'
using namespace std;
typedef long long ll;
void solve() {
string N;
cin >> N;
ll sum = 0;
for (char n : N)
sum += (n - '0');
cout << (sum % 9 == 0 ? "Yes" : "No");
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
// int t;
// cin >> t;
// ... | [["-", 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 | 98 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define FORN(i, x, y) for (int i = x; i <= y; i++)
#define DEC(i, x, y) for (int i = x; i >= y; i--)
#define scan1(X) scanf("%d", &X)
#define scan2(X, Y) scanf("%d%d", &X, &Y)
#define scan3(X, Y, Z) scanf("%d%d%d", &X, &Y, &Z... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define FORN(i, x, y) for (int i = x; i <= y; i++)
#define DEC(i, x, y) for (int i = x; i >= y; i--)
#define scan1(X) scanf("%d", &X)
#define scan2(X, Y) scanf("%d%d", &X, &Y)
#define scan3(X, Y, Z) scanf("%d%d%d", &X, &Y, &Z... | [["-", 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 | 557 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
void solve() {
string n;
int sum = 0;
cin >> n;
int le = n.length();
for (int i = 0; i < le; i++)
sum += n[i];
if (sum % 9 == 0) {
cout << "Yes"
<< "\n";
} else {
cout << "No"
<< "\n";
}
}
int main() {
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
void solve() {
string n;
int sum = 0;
cin >> n;
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";
}
}
int main(... | [["+", 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 | 114 |
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
#define ll long long
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
ll s = 0, i, l;
char n[200001... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
#define ll long long
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int main() {
ll s = 0, i, l;
char n[200001... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 100 |
N = input()
a=0
for i in range(len(N)):
a=int(N[i])%9
if a%9==0:
print('Yes')
if a%9!=0:
print('No') | N = input()
a=0
for i in range(len(N)):
a+=int(N[i])%9
if a%9==0:
print('Yes')
if a%9!=0:
print('No') | [["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 107]] | 5 | 56 |
#include <bits/stdc++.h>
int main() {
std::string n;
std::cin >> n;
int sum = 0;
for (char c : n) {
int i = c - '0';
sum += i;
}
if (sum / 9 == 0) {
std::cout << "Yes";
} else {
std::cout << "No";
}
} | #include <bits/stdc++.h>
int main() {
std::string n;
std::cin >> n;
int sum = 0;
for (char c : n) {
int i = c - '0';
sum += i;
}
if (sum % 9 == 0) {
std::cout << "Yes";
} else {
std::cout << "No";
}
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109]] | 1 | 75 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[2000001];
int i, len, sum;
scanf("%s", s);
len = strlen(s);
i = 0;
sum = 0;
while (i < len) {
sum += (s[i] - '0');
i++;
}
if (sum % 9 == 0) {
puts("yes");
} else {
puts("no");
}
}
| #include <stdio.h>
#include <string.h>
int main(void) {
char s[2000001];
int i, len, sum;
scanf("%s", s);
len = strlen(s);
i = 0;
sum = 0;
while (i < len) {
sum += (s[i] - '0');
i++;
}
if (sum % 9 == 0) {
puts("Yes");
} else {
puts("No");
}
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 99 |
import sys, os.path
if(os.path.exists('input.txt')):
sys.stdin = open('input.txt',"r")
sys.stdout = open('output.txt',"w")
sys.setrecursionlimit(10 ** 5)
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().spli... | import sys, os.path
if(os.path.exists('input.txt')):
sys.stdin = open('input.txt',"r")
sys.stdout = open('output.txt',"w")
sys.setrecursionlimit(10 ** 5)
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().spli... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 179 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
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>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
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';
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int count = 0;
for (char i : N) {
count += (int)i;
}
if (count % 9 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int count = 0;
for (char i : N) {
count += i - '0'; //(int)i とすると、charのアドレス番号が出るみたい
}
if (count % 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 | 65 |
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std::chrono;
using namespace std;
typedef long long ll;
using namespace __gnu_pbds;
... | #pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std::chrono;
using namespace std;
typedef long long ll;
using namespace __gnu_pbds;
... | [["-", 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 | 218 |
#include <bits/stdc++.h>
using namespace std;
#define bug(x) cerr << #x << " = " << x << '\n'
#define ll long long
#define x first
#define y second
#define eb emplace_back
#define maxn
#define mod 1000000007
int main() {
#ifndef ONLINE_JUDGE
// freopen(".inp","r",stdin);
#endif // ONLINE_JUDGE
// ios_bas... | #include <bits/stdc++.h>
using namespace std;
#define bug(x) cerr << #x << " = " << x << '\n'
#define ll long long
#define x first
#define y second
#define eb emplace_back
#define maxn
#define mod 1000000007
int main() {
#ifndef ONLINE_JUDGE
// freopen(".inp","r",stdin);
#endif // ONLINE_JUDGE
// ios_bas... | [["-", 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 | 102 |
#include <iostream>
#include <string>
int main() {
std::string N;
std::cin >> N;
int sum{0};
for (auto i{0}; i < N.length(); ++i) {
int n = (int)(N[i] - '0');
sum += n;
sum %= 9;
}
if (sum & 9 == 0)
std::cout << "Yes" << std::endl;
else
std::cout << "No" << std::endl;
return 0;
} | #include <iostream>
#include <string>
int main() {
std::string N;
std::cin >> N;
unsigned long long int sum{0};
for (auto i{0}; i < N.length(); ++i) {
int n = (int)(N[i] - '0');
sum += n;
sum %= 9;
}
if (sum % 9 == 0)
std::cout << "Yes" << std::endl;
else
std::cout << "No" << std::en... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 67], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109]] | 1 | 109 |
#include <iostream>
using namespace std;
#define ll long long int
#define pb push_back
#define test \
ll t; \
cin >> t; ... | #include <iostream>
using namespace std;
#define ll long long int
#define pb push_back
#define test \
ll t; \
cin >> t; ... | [["-", 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 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
long sum = 0;
cin >> s;
for (int i = 0; i < s.length(); ++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;
long sum = 0;
cin >> s;
for (int i = 0; i < s.length(); ++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 | 76 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int ans = 0;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
ans += (s[i] - '0');
}
if (ans % 9 == 0)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int ans = 0;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
ans += (s[i] - '0');
}
if (ans % 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 | 83 |
import java.math.BigInteger;
import java.util.*;
// warm-up
// Tribute to number 9 huh? As long as i can practice in Atcoder. Thank you
public class Main {
static void solve() {
Scanner sc = new Scanner(System.in);
BigInteger b = BigInteger.ZERO;
BigInteger NINE = new BigInteger("9");
for (char ch : ... | import java.math.BigInteger;
import java.util.*;
// warm-up
// Tribute to number 9 huh? As long as i can practice here at Atcoder. Thank you
public class Main {
static void solve() {
Scanner sc = new Scanner(System.in);
BigInteger b = BigInteger.ZERO;
BigInteger NINE = new BigInteger("9");
for (char ... | [["+", 8, 196, 0, 514, 8, 1, 0, 11, 17, 32], ["+", 0, 514, 8, 1, 0, 11, 12, 492, 500, 22]] | 3 | 137 |
/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | [["-", 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 | 89 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x, 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x, 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 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 | 273 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FIO \
ios_base::sync_with_stdio(0); \
cin.tie(0);
const int N = 2e5 + 5, M = 1e6 + 6, OO = 0x3f3f3f3f;
int tc;
int main() {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FIO \
ios_base::sync_with_stdio(0); \
cin.tie(0);
const int N = 2e5 + 5, M = 1e6 + 6, OO = 0x3f3f3f3f;
int tc;
int main() {
... | [["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6]] | 1 | 105 |
N = input()
sum = sum([int(i) for i in N])
if sum % 9 == 0:
print('YES')
else:
print('NO')
| N = input()
sum = sum([int(i) for i in N])
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 | 41 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n = sc.next();
int count = 0;
for (int i = 1; i < n.length(); i++) {
count += Integer.parseInt(n.substring(i - 1, i));
}
if (count % 9 == 0) {
Syste... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n = sc.next();
int count = 0;
for (int i = 1; i <= n.length(); i++) {
count += Integer.parseInt(n.substring(i - 1, i));
}
if (count % 9 == 0) {
Sys... | [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 128 |
num = input()
intNum = 0
loop = len(num)
for i in range(loop):
intNum += int(num)[i]
if intNum % 9 == 0:
print('Yes')
else:
print('No') | num = input()
intNum = 0
loop = len(num)
for i in range(loop):
intNum += int(num[i])
if intNum % 9 == 0:
print('Yes')
else:
print('No') | [["-", 0, 677, 12, 206, 51, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]] | 5 | 52 |
function Main(input) {
var inputArray = input.split('');
var sum = 0;
for (var i = 0; i < inputArray.length; i++) {
sum += inputArray[i];
}
if (sum % 9 === 0) {
console.log("Yes");
} else {
console.log("No");
}
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim()); | function Main(input) {
var inputArray = input.split('');
var sum = 0;
for (var i = 0; i < inputArray.length; i++) {
sum += Number(inputArray[i]);
}
if (sum % 9 === 0) {
console.log("Yes");
} else {
console.log("No");
}
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim()); | [["+", 8, 556, 0, 1, 0, 564, 12, 2, 63, 22], ["+", 0, 1, 0, 564, 12, 2, 3, 3, 0, 24], ["+", 0, 1, 0, 564, 12, 2, 3, 3, 0, 25]] | 2 | 104 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string n;
cin >> n;
int sum = 0;
int len = n.length();
for (int i = 0; i < len; i++)
sum += n[i];
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string n;
cin >> n;
int sum = 0;
int len = n.length();
for (int i = 0; i < len; i++)
sum += n[i] - '0';
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
}
| [["+", 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 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int s = n.size();
int ans = 0;
if (n == "0")
cout << "Yes" << endl;
else {
for (int i = 0; i < s; i++) {
ans += n[i];
ans %= 9;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
cout << ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int s = n.size();
int ans = 0;
if (n == "0")
cout << "Yes" << endl;
else {
for (int i = 0; i < s; i++) {
ans += n[i] - '0';
ans %= 9;
}
if (ans % 9 == 0)
cout << "Yes" << endl;
else
co... | [["+", 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 | 104 |
num = int(input())
ans = num%9
if ans == 0:
print("YES")
else:
print("NO") | num = int(input())
ans = num%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 | 32 |
#include <bits/stdc++.h>
// https://www.irohabook.com/exp-2
// 1e9(10桁) は 2^26乗~2^27乗 であり、int(正負の2^16乗まで)では不可
using namespace std;
char N[200010]; // 文字列
int main() {
cin >> N;
int len = strlen(N);
long long int sum = 0;
for (int i = 0; i < len; i++) {
sum += N[i];
}
cout << ((sum % 9 == 0) ? "Yes"... | #include <bits/stdc++.h>
// https://www.irohabook.com/exp-2
// 1e9(10桁) は 2^26乗~2^27乗 であり、int(正負の2^16乗まで)では不可
using namespace std;
char N[200010]; // 文字列
int main() {
cin >> N;
int len = strlen(N);
int sum = 0;
for (int i = 0; i < len; i++) {
sum += N[i] - '0';
}
cout << ((sum % 9 == 0) ? "Yes" : "... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 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 | 85 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int x = 0;
for (int i = 0; i < n.length(); i++) {
x += n.at(i);
x = x % 9;
}
if (x == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int x = 0;
for (int i = 0; i < n.length(); i++) {
// cout<<x<<endl;
x += n.at(i) - '0';
// cout<<x<<endl;
// cout<<n.at(i)<<endl;
x = x % 9;
}
// cout<<x<<endl;
if (x == 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 | 86 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
int main() {
string num;
cin >> num;
int len = (int)num.length();
int sum = 0;
for (int i = 0; i < len; i++) {
sum += num[i] - '0';
}
if (sum % 9 ==... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
int main() {
string num;
cin >> num;
int len = (int)num.length();
int sum = 0;
for (int i = 0; i < len; i++) {
sum += num[i] - '0';
}
if (sum % 9 ==... | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 99 |
#include <stdio.h>
#include <string.h>
char s[200010];
int main() {
scanf("%s", &s);
int len = strlen(s);
int sum = 0;
for (int i = 0; i < len; i++) {
sum += (int)s[i];
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| #include <stdio.h>
#include <string.h>
char s[200010];
int main() {
scanf("%s", &s);
int len = strlen(s);
int sum = 0;
for (int i = 0; i < len; i++) {
sum += s[i] - '0';
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
} | [["-", 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]] | 0 | 97 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ff first
#define ss second
#define rsz resize
#define ins insert
#define mp make_pair
#define pf push_front
#define pb push_back
#define eb emplace_back
#define ft front()
#define bk back()
#define sz(x) (int)(x).size()
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ff first
#define ss second
#define rsz resize
#define ins insert
#define mp make_pair
#define pf push_front
#define pb push_back
#define eb emplace_back
#define ft front()
#define bk back()
#define sz(x) (int)(x).size()
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 217 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int s = 0;
string str;
int l = str.size();
for (int i = 0; i < l; i++)
s = s + str[i] - 48;
if (s % 9 == 0)
cout << "Yes";
else
cout << "No";
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s = 0;
string str;
cin >> str;
int l = str.size();
for (int i = 0; i < l; i++)
s = s + str[i] - 48;
if (s % 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, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 75 |
count=0
n=input()
k=len(n)
for i in range(k):
count+=int(i)
if count%9==0:
print('Yes')
else:
print('No') | count=0
n=input()
k=len(n)
for i in range(k):
count+=int(n[i])
if count%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"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#ifndef bhupixb
#define var(...)
#define stl(...)
#endif
#define single_test
void solve() {
string s;
cin >> s;
int mul = 0;
for (char i : s) {
mul = mul * 10 + (i - '0');
}
cout << (!mul ? "Yes" : "No") <<... | #include "bits/stdc++.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#ifndef bhupixb
#define var(...)
#define stl(...)
#endif
#define single_test
void solve() {
string s;
cin >> s;
int mul = 0;
for (char i : s) {
mul = mul + (i - '0');
}
cout << (!(mul % 9) ? "Yes" : "No") <... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 12, 23, 0, 41, 15, 91, 28, 23, 0, 24], ["+", 0, 41, 15, 91, 28, 23, 0, 16, 17, 109], ["+", 0, 41, 15, 91, 28, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 41, 15, 91, 28, 23, 0, 25]] | 1 | 151 |
#include <bits/stdc++.h>
#define fastIO() ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define dpow(x) ((x) * (x))
#define in1(x) cin >> x
#define in2(x, y) cin >> x >> y
#define in3(x, y, z) cin >> x >> y >> z
#define in4(x, y, z, w) cin >> x >> y >> z >> w
#define rep(i, x, y) for (int i = x, a, b, c; ... | #include <bits/stdc++.h>
#define fastIO() ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define dpow(x) ((x) * (x))
#define in1(x) cin >> x
#define in2(x, y) cin >> x >> y
#define in3(x, y, z) cin >> x >> y >> z
#define in4(x, y, z, w) cin >> x >> y >> z >> w
#define rep(i, x, y) for (int i = x, a, b, c; ... | [["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 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 | 1,312 |
#include <iostream>
#include <string.h>
using namespace std;
int main() {
long i;
char c;
int n, sum = 0;
string s;
cin >> s;
for (i = 0; i != '\0'; ++i) {
c = s[i];
n = c - '0';
sum = sum + n;
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
}
| #include <iostream>
#include <string.h>
using namespace std;
int main() {
long i;
char c;
int n, sum = 0;
string s;
cin >> s;
for (i = 0; s[i] != '\0'; ++i) {
c = s[i];
n = c - '0';
sum = sum + n;
}
if (sum % 9 == 0)
cout << "Yes";
else
cout << "No";
return 0;
}
| [["+", 8, 9, 0, 7, 15, 16, 31, 69, 28, 22], ["+", 0, 7, 15, 16, 31, 69, 341, 342, 0, 70], ["+", 0, 7, 15, 16, 31, 69, 341, 342, 0, 73]] | 1 | 96 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int res = 0;
string n;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 0; i < n.size(); i++) {
res += n[i] - 48;
}
if (res % 9 == 0)
cout << "YES";
else
cout << "NO";... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int res = 0;
string n;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 0; i < n.size(); i++) {
res += n[i] - 48;
}
if (res % 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 | 94 |
import numpy as np
N=int(input())
if N//9==0:
print("Yes")
else :
print("No")
| import numpy as np
N=int(input())
if N%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 | 33 |
#include <iostream>
using namespace std;
int main() {
string N;
int sum = 0;
cin >> N;
for (int i = 0; i < N.size(); i++) {
sum += (N[i] - '0') % 9;
}
if (!sum % 9)
cout << "Yes";
else
cout << "No";
}
| #include <iostream>
using namespace std;
int main() {
string N;
int sum = 0;
cin >> N;
for (int i = 0; i < N.size(); i++) {
sum += (N[i] - '0') % 9;
sum = sum % 9;
}
if (!sum % 9)
cout << "Yes";
else
cout << "No";
}
| [["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 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, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 79 |
print('YNeos'[sum(map(int,input()))%9::2])
| print('YNeos'[sum(map(int,input()))%9!=0::2])
| [["+", 3, 4, 0, 206, 206, 663, 0, 666, 667, 79], ["+", 3, 4, 0, 206, 206, 663, 0, 666, 0, 612]] | 5 | 24 |
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> N(200010);
int sum = 0;
for (int i = 0; i < 200010; i++) {
cin >> N.at(i);
sum += N.at(i) - 0;
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> N(200010, '0');
int sum = 0;
for (int i = 0; i < 200010; i++) {
cin >> N.at(i);
sum += N.at(i) - '0';
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 21], ["+", 0, 43, 49, 50, 51, 4, 0, 103, 0, 104], ["+", 0, 43, 49, 50, 51, 4, 0, 103, 0, 125], ["+", 0, 1, 0, 11, 12, 16, 12, 103, 0, 104]] | 1 | 91 |
#include <iostream>
#define int long long
using namespace std;
int32_t main() {
string s;
cin >> s;
int p = 0;
for (char c : s) {
int dig = c - '0';
p += dig;
}
if (p % 9)
cout << "NO\n";
else
cout << "YES\n";
return 0;
} | #include <iostream>
#define int long long
using namespace std;
int32_t main() {
string s;
cin >> s;
int p = 0;
for (char c : s) {
int dig = c - '0';
p += dig;
}
if (p % 9)
cout << "No\n";
else
cout << "Yes\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 | 73 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String N = sc.next();
int sum = 0;
for (int i = 0; i < N.length(); i++) {
sum += N.charAt(i);
}
if (sum % 9 == 0) {
System.out.println("Yes");
} else {
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String N = sc.next();
int sum = 0;
for (int i = 0; i < N.length(); i++) {
sum += N.charAt(i) - '0';
}
if (sum % 9 == 0) {
System.out.println("Yes");
} els... | [["+", 8, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 12, 252]] | 3 | 113 |
#include <iostream>
using namespace std;
#define ll long long
int main() {
string str;
ll sum = 0;
cin >> str;
for (auto each : str) {
sum = (sum + each - '0') % 9;
}
if (sum == 0) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
#define ll long long
int main() {
string str;
ll sum = 0;
cin >> str;
for (auto each : str) {
sum = (sum + each - '0') % 9;
}
if (sum == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| [["-", 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;
int main() {
string N;
cin >> N;
int64_t sum = 0;
for (int i = 0; i < N.length(); i++) {
sum += N.at(i);
}
if (sum % 9 == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int64_t sum = 0;
for (int i = 0; i < N.length(); i++) {
sum += N.at(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 | 82 |
// ConsoleApplication1.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string... | // ConsoleApplication1.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string... | [["+", 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 | 1,016 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] n = sc.nextLine().toCharArray();
String ans = "Yes";
long culc = 0;
for (char num : n) {
culc += Integer.parseInt(String.valueOf(num));
}
if (culc %... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] n = sc.nextLine().toCharArray();
String ans = "No";
long culc = 0;
for (char num : n) {
culc += Integer.parseInt(String.valueOf(num));
}
if (culc % ... | [["-", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["+", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]] | 3 | 116 |
#include <stdio.h>
#include <stdlib.h>
int ctoi(char c);
int main() {
int n;
char s[200002];
scanf("%s%n", s, &n);
long long int sum = 0;
for (int i = 0; i < n; i++) {
sum += ctoi(s[i]);
}
if (sum % 9 == 0) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
int ctoi(char c) {
... | #include <stdio.h>
#include <stdlib.h>
int ctoi(char c);
int main() {
int n;
char s[200002];
scanf("%s%n", s, &n);
long int sum = 0;
for (int i = 0; i < n; i++) {
sum += ctoi(s[i]);
}
if (sum % 9 == 0) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
int ctoi(char c) {
switc... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 99, 8, 9, 0, 100, 0, 93, 0, 94], ["+", 0, 99, 8, 9, 0, 100, 0, 37, 0, 38], ["+", 0, 99, 8, 9, 0, 100, 0, 37, 0, 13]] | 0 | 201 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define all(x) (x).begin(), (x).end()
#define sort_u(x) sort((x).begin(), (x).end())
#define sort_d(x) sort((x).begin(), (x).end(), greater<int>())
#define pb push_back
#define INF ((1LL << 62) - (... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define all(x) (x).begin(), (x).end()
#define sort_u(x) sort((x).begin(), (x).end())
#define sort_d(x) sort((x).begin(), (x).end(), greater<int>())
#define pb push_back
#define INF ((1LL << 62) - (... | [["-", 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 | 148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.