結果

問題 No.791 うし数列
ユーザー takahiro-serikawatakahiro-serikawa
提出日時 2019-04-12 04:39:24
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 23,752 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-11 09:31:07
合計ジャッジ時間 1,273 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,348 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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++)
            ;

        printf("%d, %c\n", i, N[i]);
        if (N[i--] == '\0' && i > 0 && i <= 100) {
            printf("%d\n", i);
            exit(0);
        }
    }
    printf("-1\n");
}
0