結果
| 問題 | No.791 うし数列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-03 15:59:34 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 720 ms |
| コンパイル使用メモリ | 77,680 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-21 02:19:21 |
| 合計ジャッジ時間 | 1,341 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main(){
string n;
cin>>n;
for(int i=0;i<n.size();i++)
if(n[i]!=(i?'3':'1'))
cout<<-1<<endl,exit(0);
cout<<n.size()-1-(n.size()==1)<<endl;
}