結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
Kura
|
| 提出日時 | 2019-02-27 09:48:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| コンパイル時間 | 1,544 ms |
| コンパイル使用メモリ | 158,044 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-06-23 05:01:05 |
| 合計ジャッジ時間 | 2,012 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
string n;cin>>n;
if(n[0]=='1'){
int a=0;
for(int i=1;i<n.length();i++){
if(n[i]=='3')a++;
}
if(a==n.length()-1){
cout<<a<<endl;
return 0;
}
}
cout<<-1<<endl;
}
Kura