結果
| 問題 | No.791 うし数列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-06 14:35:51 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 286 bytes |
| 記録 | |
| コンパイル時間 | 1,850 ms |
| コンパイル使用メモリ | 165,584 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 12:38:10 |
| 合計ジャッジ時間 | 2,215 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 3 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;
int main(){
string s; cin>>s;
ll ans=0;
ll n=s.size();
for(ll i=1; i<n; i++){
if(s[i]=='3') ans++;
else { cout << "-1" << endl; return 0; }
}
cout << ans << endl;
}