結果

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

ソースコード

diff #

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

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