結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
proribone
|
| 提出日時 | 2019-06-04 06:53:49 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 28,800 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-17 20:41:07 |
| 合計ジャッジ時間 | 760 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
ソースコード
#include<stdio.h>
#include<math.h>
int main(){
char n[120];
int i;
int c=0;
scanf("%s",n);
if(n[0]=='1'){
for(i=1;n[i]!='\0';i++){
if(n[i]=='3'){
c++;
}else{
printf("-1");
return 0;
}
}
if(c>0){
printf("%d",c);
}
}else{
printf("-1");
}
return 0;
}
proribone