結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-02 09:12:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 396 bytes |
| コンパイル時間 | 533 ms |
| コンパイル使用メモリ | 62,976 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-03 05:51:25 |
| 合計ジャッジ時間 | 1,179 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#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( "-1\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;
}