結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
ui_mtc
|
| 提出日時 | 2020-01-26 18:18:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 336 bytes |
| コンパイル時間 | 1,666 ms |
| コンパイル使用メモリ | 167,092 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 11:11:48 |
| 合計ジャッジ時間 | 2,586 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string S;
cin >> S;
bool fg = true;
for( int i = 0; i < S.size(); i++ ){
if( i == 0 && S.at(i) != '1' ) fg = false;
if( i > 0 && S.at(i) != '3' ) fg = false;
}
if( fg ) cout << (int)S.size() - 1 << endl;
else cout << -1 << endl;
}
ui_mtc