結果

問題 No.3501 Digit Products 2
コンテスト
ユーザー Naru820
提出日時 2026-03-28 04:00:12
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 1,403 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 11,710 ms
コンパイル使用メモリ 444,524 KB
実行使用メモリ 53,864 KB
最終ジャッジ日時 2026-04-17 19:49:27
合計ジャッジ時間 17,924 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 1
other TLE * 1 -- * 71
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
#define all(a) begin(a), end(a)
#define space inf.readChar(' ')
#define endl inf.readChar('\n')
#define eof inf.readEof()
tuple<ll> read(ll min, ll max){
    ll a = inf.readLong(min, max);
    endl;
    return tuple{a};
}
template<class... T> auto read(ll min, ll max, T... t){
    ll a = inf.readLong(min, max);
    space;
    return tuple_cat(tuple{a}, read(t...));
}
string read(string p){
    return inf.readLine(p);
}
vector<ll> reads(ll N, ll min, ll max){
    auto a = inf.readLongs(N, min, max);
    endl;
    return a;
}
vector<string> read_lines(ll N, string p){
    return inf.readLines(N, p);
}
template<class... T> auto read_lines(ll N, T... t){
    vector<decltype(read(t...))> a;
    a.reserve(N);
    while(N--) a.push_back(read(t...));
    return a;
}
vector<vector<ll>> read_matrix(ll H, ll W, ll min, ll max){
    vector<vector<ll>> ans(H);
    for(auto& v : ans) v = reads(W, min, max);
    return ans;
}

const int MIN_N = 2;
const int MAX_N = 51;

int main() {
    registerValidation();
    int N = inf.readInt(MIN_N, MAX_N);
    inf.readEoln();
    
    string X = inf.readString();
    ensure((int)X.length() == N);
    ensure(X[0] >= '1' && X[0] <= '9');
    for(int i = 1; i < N; ++i) {
        ensure(X[i] >= '0' && X[i] <= '9');
    }
    
    inf.readEof();
}
0