Submission #47001170


Source Code Expand

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

//template
using ll = long long;
using ull = unsigned long long;
const int inf = INT_MAX/2;
const ll infl = LONG_MAX/2;

#define OVERLOAD(e1, e2, e3, e4, NAME, ...) NAME
#define REP1(i, b) for (ll i = 0, i##_len = ll(b); i < i##_len; i++)
#define REP2(i, a, b) for (ll i = ll(a), i##_len = ll(b); i < i##_len; i++)
#define REP3(i, a, b, c) for (ll i = ll(a), i##_len = ll(b); i < i##_len; i += ll(c))
#define rep(...) OVERLOAD(__VA_ARGS__, REP3, REP2, REP1)(__VA_ARGS__)
#define REPS1(i, b) for (ll i = 0, i##_len = ll(b); i <= i##_len; i++)
#define REPS2(i, a, b) for (ll i = ll(a), i##_len = ll(b); i <= i##_len; i++)
#define REPS3(i, a, b, c) for (ll i = ll(a), i##_len = ll(b); i <= i##_len; i += ll(c))
#define reps(...) OVERLOAD(__VA_ARGS__, REPS3, REPS2, REPS1)(__VA_ARGS__)
#define RREP1(i, a) for (ll i = ll(a); i >= 0; i--)
#define RREP2(i, a, b) for (ll i = ll(a), i##_len = ll(b); i >= i##_len; i--)
#define RREP3(i, a, b, c) for (ll i = ll(a), i##_len = ll(b); i >= i##_len; i -= ll(c))
#define rrep(...) OVERLOAD(__VA_ARGS__, RREP3, RREP2, RREP1)(__VA_ARGS__)

#define vrep(i, vec) for (auto &i: vec)
#define all(x) (x).begin(), (x).end()
#define Yes(bool) if(bool) {println("Yes");} else {println("No");}

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117;
template<class T> double rad(const T theta) { return theta*pi/180; }

ll mpow(ll x, ll n) { ll ret = 1; while (n > 0) { if (n & 1) ret *= x; x *= x; n >>= 1; } return ret; }

void printd() { cout << '\n'; } template<class T, class... Ts> void printd(const T& a, const Ts&... b) { cout << setprecision(20) << a; if (sizeof...(b) != 0) {cout << ' ';}; printd(b...); }
void println() { cout << '\n'; } template<class T, class... Ts> void println(const T& a, const Ts&... b) { cout << a; if (sizeof...(b) != 0) {cout << ' ';}; println(b...); }
void print() {} template<class T, class... Ts> void print(const T& a, const Ts&... b) { cout << a; if (sizeof...(b) != 0) {cout << ' ';}; print(b...); }
template<class T> void printv(const T vec) { int i = 0; int s = vec.size(); vrep(v, vec) { print(v); i++; if (i != s) print(' '); } println(); }
template<class T> void printvv(const T vec) { vrep(v, vec) { printv(v); } }
void in() {} template<class T, class... Ts> void in(T& a, Ts&... b) { cin >> a; in(b...); }



int main() {
    int N;
    in(N);

    rep(i, N, 1000) {
        string s = to_string(i);
        if ((s[0] - '0')*(s[1] - '0') == s[2] - '0') {
            println(i);
            break;
        }
    }


    return 0;
}

Submission Info

Submission Time
Task B - 326-like Numbers
User kaede2912
Language C++ 23 (gcc 12.2)
Score 200
Code Size 2722 Byte
Status AC
Exec Time 1 ms
Memory 3688 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 1 ms 3512 KiB
random_02.txt AC 1 ms 3688 KiB
random_03.txt AC 1 ms 3524 KiB
random_04.txt AC 1 ms 3484 KiB
random_05.txt AC 1 ms 3532 KiB
random_06.txt AC 1 ms 3508 KiB
random_07.txt AC 1 ms 3408 KiB
random_08.txt AC 1 ms 3604 KiB
random_09.txt AC 1 ms 3404 KiB
random_10.txt AC 1 ms 3524 KiB
random_11.txt AC 1 ms 3512 KiB
random_12.txt AC 1 ms 3408 KiB
sample_01.txt AC 1 ms 3608 KiB
sample_02.txt AC 1 ms 3568 KiB
sample_03.txt AC 1 ms 3536 KiB