結果
問題 | No.2607 Add One Digit |
ユーザー |
![]() |
提出日時 | 2024-01-19 21:23:35 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 782 bytes |
コンパイル時間 | 6,984 ms |
コンパイル使用メモリ | 261,160 KB |
最終ジャッジ日時 | 2025-02-18 20:34:03 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 RE * 1 TLE * 1 |
ソースコード
#include <bits/stdc++.h> #define int ll using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define per(i,n) for(int i=n-1;i>=0;i--) #define rng(i,c,n) for(int i=c;i<n;i++) #define fi first #define se second #define pb push_back #define sz(a) (int)a.size() #define vec(...) vector<__VA_ARGS__> #define _48SMghu ios::sync_with_stdio(0),cin.tie(0) using ll=long long; using pii=pair<int,int>; using vi=vector<int>; void print(){cout<<'\n';} template<class h,class...t> void print(const h&v,const t&...u){cout<<v<<' ',print(u...);} void slv(){ string s; cin>>s; set<int> st; rep(i,sz(s)+1){ rep(x,10){ if(!i and !x) continue; string ns=s; ns.insert(ns.begin()+i,(char)(x+'0')); st.insert(stoi(ns)); } } print(sz(st)); } signed main(){ _48SMghu; slv(); }