結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-13 23:48:48 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 295 bytes |
| コンパイル時間 | 586 ms |
| コンパイル使用メモリ | 73,560 KB |
| 最終ジャッジ日時 | 2025-01-06 22:07:04 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 8 |
ソースコード
#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;
cout << (b ? s.size() - 1 : -1) << endl;
}