Submission #107667

#TimeUsernameProblemLanguageResultExecution timeMemory
107667dfistricSequence (BOI14_sequence)C++14
0 / 100
4 ms668 KiB
#include <bits/stdc++.h>

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORd(i, a, b) for (int i = (a); i >= (b); i--)
#define REP(i, n) FOR(i, 0, n)
#define ll long long

using namespace std;

const int MAXN = 100100;
ll arr[MAXN];

int main() {
    ios_base::sync_with_stdio(false);
 
    int n;
    cin >> n;
    REP(i, n) cin >> arr[i];

    if (arr[0] != 9) {
        n--;
        int t = 1;
        while (t < n) t *= 10;

        if (arr[0] == 0) cout << 10 * t << "\n";
        else             cout << arr[0] * t << "\n";
    } else {
        assert(0);
    }

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...