結果

問題 No.791 うし数列
ユーザー 259_Momone
提出日時 2019-02-22 21:22:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 316 bytes
コンパイル時間 1,076 ms
コンパイル使用メモリ 157,232 KB
実行使用メモリ 16,704 KB
最終ジャッジ日時 2024-11-25 05:06:37
合計ジャッジ時間 28,701 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 TLE * 1
other AC * 5 WA * 3 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    char c;
    cin >> c;
    if(c != '1')return 0 & puts("-1");
    long i = 1;
    cin >> c;
    while(c == '3'){
        ++i;
        cin >> c;
        if('0' <= c && c <= '9' && c != '3')return 0 & puts("-1");
    }
    cout << i << endl;
    return 0;
}
0