Problem: 2050C - Uninteresting Number
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 3):
using namespace std;
#include <bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define si set<int>
#define sll set<long long>
#define sc set<char>
#define ss set<string>
#define usi unordered_set<int>
#define pqi priority_queue<int>
#define pqll priority_queue<ll>
#define mii map<int, int>
#define umii unordered_map<int, int>
#define pii pair<int, int>
#define pllll pair<long long, long long>
#define f(i,s,e) for(int i = s; i < e; i++)
#define cf(i,s,e) for(int i = s; i <= e; i++)
#define rf(i,e,s) for(int i = e-1; i >= s; i--)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define eb embrace_back
#define mp make_pair
#define fi first
#define se second
#define ub upper_bound
#define lb lower_bound
#define sz(x) (int)(x).size()
#define fastioa ios::sync_with_stdio(0); cin.tie(0); freopen("a.in", "r", stdin); freopen("a.out", "w", stdout);
#define fastio ios::sync_with_stdio(0); cin.tie(0);
#define MOD 1000000007
#define inf 1e9  // Use for int (e.g., distance)
#define inf_ll 1e18  // Use for long long
#define eps 1e-9  // Precision for floating-point comparisons

void solve()
{
    string number;
    cin >> number;
    vector<int> num;
    int sum = 0;
    int a = 0, b = 0;
    for (char digit : number)
    {
        sum += (digit - '0');
        if (digit - '0' == 2) a++;
        if (digit - '0' == 3) b++;
    }
    f (i, 0, min(8, a + 1))
    {
        f (j, 0, min(8, b + 1))
        {
            if ((sum + i * 2 + j * 6) % 9 == 0)
            {
                cout << "YES" << "\n"; return;
            }
        }
    }
    cout << "No" << "\n";


}
int main()
{
    fastio
    int t; cin >> t;
    while (t --)
    {
        solve();
    }
}

Submission (verdict: Wrong answer on test 1):
using namespace std;
#include <bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define si set<int>
#define sll set<long long>
#define sc set<char>
#define ss set<string>
#define usi unordered_set<int>
#define pqi priority_queue<int>
#define pqll priority_queue<ll>
#define mii map<int, int>
#define umii unordered_map<int, int>
#define pii pair<int, int>
#define pllll pair<long long, long long>
#define f(i,s,e) for(int i = s; i < e; i++)
#define cf(i,s,e) for(int i = s; i <= e; i++)
#define rf(i,e,s) for(int i = e-1; i >= s; i--)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define eb embrace_back
#define mp make_pair
#define fi first
#define se second
#define ub upper_bound
#define lb lower_bound
#define sz(x) (int)(x).size()
#define fastioa ios::sync_with_stdio(0); cin.tie(0); freopen("a.in", "r", stdin); freopen("a.out", "w", stdout);
#define fastio ios::sync_with_stdio(0); cin.tie(0);
#define MOD 1000000007
#define inf 1e9  // Use for int (e.g., distance)
#define inf_ll 1e18  // Use for long long
#define eps 1e-9  // Precision for floating-point comparisons

void solve()
{
    string number;
    cin >> number;
    vector<int> num;
    int sum = 0;
    int a = 0, b = 0;
    for (char digit : number)
    {
        sum += (digit - '0');
        if (digit - '0' == 2) a++;
        if (digit - '0' == 3) b++;
    }
    cf (i, 0, min(8, a + 1))
    {
        cf (j, 0, min(8, b + 1))
        {
            if ((sum + i * 2 + j * 6) % 9 == 0)
            {
                cout << "YES" << "\n"; return;
            }
        }
    }
    cout << "No" << "\n";


}
int main()
{
    fastio
    int t; cin >> t;
    while (t --)
    {
        solve();
    }
}