結果
問題 |
No.791 うし数列
|
ユーザー |
![]() |
提出日時 | 2019-07-05 20:01:39 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 28,928 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-22 04:54:29 |
合計ジャッジ時間 | 798 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 1 |
ソースコード
#include<stdio.h> #include<string.h> int main() { char n[1003]; scanf("%s", n); if (n[0] != '1') { printf("-1\n"); return 0; } else { int i, l = strlen(n); for (i = 1; i < l; i++) { if (n[i] != '3') { printf("-1\n"); return 0; } } printf("%d\n", l - 1); return 0; } }