結果
問題 | No.2607 Add One Digit |
ユーザー | Ricardo Campos |
提出日時 | 2024-01-24 06:54:09 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 3,098 bytes |
コンパイル時間 | 1,386 ms |
コンパイル使用メモリ | 165,600 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-28 06:59:42 |
合計ジャッジ時間 | 2,137 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 2 ms
5,376 KB |
testcase_05 | AC | 2 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 2 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 2 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 2 ms
5,376 KB |
testcase_12 | AC | 1 ms
5,376 KB |
testcase_13 | AC | 1 ms
5,376 KB |
testcase_14 | AC | 2 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | AC | 2 ms
5,376 KB |
testcase_17 | AC | 2 ms
5,376 KB |
testcase_18 | AC | 1 ms
5,376 KB |
testcase_19 | AC | 1 ms
5,376 KB |
ソースコード
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; using namespace std; // TAGS #define nl '\n' #define pb push_back #define pf push_front #define lb lower_bound #define ub upper_bound // Generic #define fi first #define se second #define all(v) v.begin(),v.end() // inicio - fin #define rall(v) v.rbegin(),v.rend() // fin - inicio // CodeForces Optional #define YES cout << "YES" << nl; #define NO cout << "NO" << nl; #define YESNO(x) cout << ((x)? "YES" : "NO") << nl; #define jmp cout << nl; #define fix cout << fixed << setprecision(15); #define ii pair<int,int> // 2 #define iii pair<ii,int> // 3 #define iiii pair<ii,ii> // 4 // Debuging #define qwer cerr << "----------------------" << endl; #define debugList(A) if(debug) { cerr << "? " << #A << ": "; if(debug) { bool band = 0; cerr << "[ "; for(auto x : A) { if(!band) cerr << x , band = 1; else cerr << " , " << x ;} cerr << " ]" << endl; } } #define debugVar(A) if(debug) { cerr << "? " << #A << " : " << A << endl; } #define debugPair(a,b) if(debug) { cerr << "?? " << #a << " : " << a << " | " << #b << " : " << b << endl; } #define printList(A) bool band = 0; for(auto x : A) { if(!band) {cout << x; band = 1;}else {cout << " " << x;}} cout << endl; #define debugIterablePairs(P) if(debug) { qwer cerr << "? " << #P << " : "; cerr << "{ " << endl; for(auto it : P) { cerr << " " << it.first << " -> " << it.second << endl; } cerr << "} " << endl; qwer } #define debugGraph(GP) if(debug) { cerr << "? " << #GP << " = "; cerr << "{ " << endl; int cntNodes = 0; for(vi adj : GP) { if(adj.size()) { cerr << " "; cerr << cntNodes << " => "; debugList(adj) } cntNodes ++;} cerr << "}" << endl;} #define debugGraphWeight(GP) if(debug) { qwer cerr << "? " << #GP << " = {" << endl; int cntNodes = 0; for(auto it : GP ){ if( it.size() ){ cerr << cntNodes << " => [ "; for(auto iter : it){ cerr << iter.fi << "-w{" << iter.se << "} "; } cerr << "]" << endl; } cntNodes++; } qwer } #define executeTime cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"; #define FOR(i,a,b) for(int i=a ; i<b ; i++) #define mem(v,x) memset(v, (x), sizeof(v)) #define sz(a) (int) a.size() #define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin()) typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; // Const const int N = 2e5 + 9; const int mod = 1e9 + 7; const int inf = 2e9 + 9; const ll modL = 1e9 + 7; const ll infL = 2e18 + 9; const double pi = acos(-1); void init(); bool debug = { 0 }; void solve() { string s; cin >> s; cout << ( sz(s) + 1 ) * 9 << nl; } int main(){ //init(); cin.tie(0); ios_base::sync_with_stdio(0); int N = 1; //cin >> N; while(N--) solve(); //executeTime; return 0; } void init(){ //#ifndef ONLINE_JUDGE // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); // freopen("error.txt","w",stderr); // #endif cerr << "Mood Try Winner ALL\n"; cerr << "Never Ctrl + C - Ctrl + V\n"; }