結果
問題 | No.791 うし数列 |
ユーザー |
|
提出日時 | 2019-10-02 09:11:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 396 bytes |
コンパイル時間 | 619 ms |
コンパイル使用メモリ | 63,104 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-03 05:51:23 |
合計ジャッジ時間 | 1,390 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 4 |
ソースコード
#include <cstdio> #include <iostream> #include <string> #define rep( i, n, m ) for(int i = ( n ); i < ( m ); i++) typedef long long int ll; int main( void ){ std::string str; std::cin >> str; if (str[ 0 ] != '1'){ printf( "-2\n" ); return 0; } rep( i, 1, str.length()){ if (str[ i ] != '3'){ printf( "-1\n" ); return 0; } } printf( "%d\n", str.length() - 1 ); return 0; }