結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-13 23:53:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 581 ms |
| コンパイル使用メモリ | 73,300 KB |
| 最終ジャッジ日時 | 2025-01-06 22:07:09 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
string s; cin >> s;
bool b = 1;
if (s[0] != '1')b = 0;
for (int i = 1; i < s.size(); i++)if (s[i] != '3')b = 0;
if (b)cout << s.size() - 1 << endl; else cout << -1 << endl;
}