結果
| 問題 |
No.2607 Add One Digit
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-19 22:01:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 477 bytes |
| コンパイル時間 | 2,093 ms |
| コンパイル使用メモリ | 172,616 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-28 04:27:03 |
| 合計ジャッジ時間 | 2,287 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
int main(void){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
ll i,j,k;
string N;
cin >> N;
set<string> s;
ll n=N.size();
REP(i,n){
REP(j,10){
string t=N;
t.insert(i,1,char('0'+j));
s.insert(t);
}
}
REP(i,10){
string t=N;
t+=char('0'+i);
s.insert(t);
}
cout << s.size()-1 << endl;
return 0;
}