結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2020-12-21 22:44:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| コンパイル時間 | 1,941 ms |
| コンパイル使用メモリ | 192,976 KB |
| 最終ジャッジ日時 | 2025-01-17 05:43:32 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 11 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
if(S.at(0) != '1'){
cout<<-1<<endl;
return 0;
}
for(int i=1;i<S.length();i++){
if(S.at(i) != '3'){
cout<<-1<<endl;
}
}
if(S.length()==1){
cout<<-1<<endl;
return 0;
}
cout<<S.length()-1<<endl;
return 0;
}
chacoder1