結果
| 問題 | No.791 うし数列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-06-29 16:13:55 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 286 bytes | 
| コンパイル時間 | 409 ms | 
| コンパイル使用メモリ | 56,044 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 05:35:22 | 
| 合計ジャッジ時間 | 1,077 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 | 
ソースコード
#include <cstdio>
#include <string>
#include <algorithm>
char buf [102];
int main() {
    scanf("%s", buf); std::string s = buf;
    printf("%d\n", s.length() > 1 && buf[0] == '1' && std::all_of(++s.begin(), s.end(), [](const char &c){ return c == '3'; }) ? int(s.length() - 1) : -1);
}
            
            
            
        