結果
| 問題 | No.791 うし数列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-12 04:36:32 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 213 ms |
| コンパイル使用メモリ | 37,328 KB |
| 最終ジャッジ日時 | 2026-02-24 01:02:47 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 1 |
| other | AC * 6 RE * 9 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char N[102+1];
scanf("%s", N);
if (N[0] == '1') {
int i;
for (i = 1; N[i] == '3'; i++)
;
if (N[i--] == '\0' && i > 1 && i <= 100) {
printf("%d\n", i);
exit(0);
}
}
printf("-1\n");
}