結果
問題 | No.1070 Missing a space |
ユーザー | Rayhan Ahmad |
提出日時 | 2020-06-05 22:17:17 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 2,015 ms |
コンパイル使用メモリ | 161,864 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 18:26:08 |
合計ジャッジ時間 | 2,676 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int cnt =0; for(int i=0; i<s.size(); i++) { string first = s.substr(0,i+1); string second = s.substr(i+1,s.size()); if(!first.empty() && !second.empty() && first[0]!='0' && second[0]!='0'){ //cout<<first<<" "<<second<<endl; cnt++; } } cout<<cnt<<endl; }