結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-03 00:09:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 255 bytes |
| コンパイル時間 | 639 ms |
| コンパイル使用メモリ | 65,808 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 13:05:22 |
| 合計ジャッジ時間 | 1,183 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 8 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool f = (s[0] == '1');
for (int i = 1; i < s.size(); i++) {
f &= (s[i] == '3');
}
cout << (f ? s.size() - 1 : -1) << endl;
}