結果
問題 |
No.791 うし数列
|
ユーザー |
|
提出日時 | 2019-06-30 10:46:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 368 ms |
コンパイル使用メモリ | 55,160 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 18:18:31 |
合計ジャッジ時間 | 1,031 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 1 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ string S; int x=1; cin>>S; if(S[0]=='1'){ while((x!=0)&&(x<S.length())){ if(S[x]!='3'){ x=0; }else{ x++; } } }else{ x=0; } cout<<--x<<endl; return 0; }