結果

問題 No.481 1から10
コンテスト
ユーザー vjudge1
提出日時 2026-02-11 01:22:44
言語 C++17(clang)
(clang++ 21.1.8 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,249 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,567 ms
コンパイル使用メモリ 173,832 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-02-11 01:22:55
合計ジャッジ時間 10,655 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

typedef long long ll;
#define int long long

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<char> vc;

#define f first
#define s second
#define pb push_back
#define po pop_back
#define foo(i, a, b) for (int i = a; i < b; i++)
#define rfoo(i, a, b) for (int i = a; i >= b; i--)
#define input(v)      \
    for (auto &x : v) \
    cin >> x
#define print(v)          \
    for (auto x : v)      \
        cout << x << " "; \
    cout << '\n'
#define all(x) (x).begin(), (x).end()
#define YES cout << "YES" << std::endl;
#define NO cout << "NO" << std::endl;
const int MOD = 1e9 + 7;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

ll power(ll a, ll b)
{
    ll res = 1;
    while (b)
    {
        if (b & 1)
            res *= a;
        a *= a;
        b >>= 1;
    }
    return res;
}

ll modexp(ll a, ll b, ll mod)
{
    ll res = 1;
    a %= mod;
    while (b)
    {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
    return res;
}

int digitCount(ll n, int base = 10)
{
    return n ? (int)(log(n) / log(base)) + 1 : 1;
}
bool isprime(int n)
{
    if (n < 2)
        return false;
    for (int i = 2; i * i <= n; i++)
        if (n % i == 0)
            return false;
    return true;
}
void sieve(int n, vector<bool> &isPrime)
{
    isPrime.assign(n + 1, true);
    isPrime[0] = isPrime[1] = false;
    for (int i = 2; i * i <= n; ++i)
        if (isPrime[i])
            for (int j = i * i; j <= n; j += i)
                isPrime[j] = false;
}
vi factors(int n)
{
    vi res;
    for (int i = 1; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            res.pb(i);
            if (i != n / i)
                res.pb(n / i);
        }
    }
    sort(all(res));
    return res;
}

int getbit(long long n, int b) { return (n >> (b - 1)) & 1; }
long long setbit(long long n, int b) { return n | (1LL << (b - 1)); }
long long resetbit(long long n, int b) { return n & ~(1LL << (b - 1)); }
long long togglebit(long long n, int b) { return n ^ (1LL << (b - 1)); }
bool ispoftwo(long long n) { return n > 0 && !(n & (n - 1)); }
int countSetBits(long long n) { return __builtin_popcountll(n); }
long long lastKbits(long long n, int k) { return n & ((1LL << k) - 1); }
long long clearRightmostBit(long long n) { return n & (n - 1); }
long long rightmostBit(long long n) { return n & -n; }
int rightmostBitPos(long long n) { return n == 0 ? -1 : __builtin_ctzll(n) + 1; }
int highestBitPos(long long n) { return n == 0 ? -1 : 63 - __builtin_clzll(n); }
bool isDivisibleByPowerOf2(ll n, int k)
{
    ll powerOf2 = 1 << k;
    return (n & (powerOf2 - 1)) == 0;
}

#define lb(v, x) (lower_bound(all(v), x) - (v).begin())
#define ub(v, x) (upper_bound(all(v), x) - (v).begin())
#define count_occ(v, x) (ub(v, x) - lb(v, x))

#define fastio                   \
    ios::sync_with_stdio(false); \
    cin.tie(nullptr);            \
    cout.tie(nullptr)

signed main()
{
    fastio;
    //    int t=1;
    //    cin>>t;

    int i = 1;
    int n = 0;
    while (1)
    {
        cin >> n;
        if (n != i)
        {
            cout << i << endl;
            break;
        }
        i++;
    }
}
0