結果

問題 No.791 うし数列
ユーザー bal4u
提出日時 2019-04-12 07:29:52
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 27,392 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 14:37:32
合計ジャッジ時間 919 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

// yukicoder: No.791 うし数列
// 2019.4.12 bal4u

#include <stdio.h>

int main()
{
	int c, ans;

	if (getchar() != '1') goto ng;
	ans = 0;
	while (1) {
		c = getchar();
		if (c < '0') break;
		if (c != '3') goto ng;
		ans++;
	}
	printf("%d\n", ans);
	return 0;
ng: puts("-1");
	return 0;
}
0