結果

問題 No.791 うし数列
ユーザー ei1333333
提出日時 2018-10-28 01:28:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 1,697 ms
コンパイル使用メモリ 191,880 KB
最終ジャッジ日時 2025-01-06 14:55:26
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(){
  string S;
  cin >> S;
  for(int i = 1; i < S.size(); i++) {
    if(S[i] != '3') {
      cout << "-1\n";
      return 0;
    }
  }
  if(S.size() >= 2) cout << S.size() - 1 << endl;
  else cout << -1 << endl;
}
0