結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
otsuri_114514
|
| 提出日時 | 2019-03-13 10:32:41 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 15:58:42 |
| 合計ジャッジ時間 | 886 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include <stdio.h>
#include <string.h>
int main(void){
char s[1100];
scanf("%s",s);
if(s[0]!='1'){
printf("-1\n");
return 0;
}
int i,n=strlen(s);
for(i=1;i<n;i++){
if(s[i]!='3'){
printf("-1");
return 0;
}
}
printf("%d",n-1);
return 0;
}
otsuri_114514