Submission #107647

#TimeUsernameProblemLanguageResultExecution timeMemory
107647dfistricSequence (BOI14_sequence)C++14
0 / 100
4 ms640 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];
    
    n--;
    ll t = 1;
    while (t < n) t *= 10;

    if (arr[0] == 0) cout << 10LL * t << "\n";
    else {
        if (arr[0] == 9) assert(0);
        cout << arr[0] * t << "\n";
    }
    
    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...