結果

問題 No.786 京都大学の過去問
ユーザー yasukotelinyasukotelin
提出日時 2019-03-23 21:39:14
言語 Go
(1.22.1)
結果
TLE  
実行時間 -
コード長 286 bytes
コンパイル時間 10,754 ms
コンパイル使用メモリ 223,824 KB
実行使用メモリ 8,720 KB
最終ジャッジ日時 2023-10-24 22:50:38
合計ジャッジ時間 14,303 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,720 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

var pattern int
var limit int

func main() {
	fmt.Scanln(&limit)

	stepCount(0)

	fmt.Println(pattern)
}

func stepCount(total int) {
	if limit == total {
		pattern++
		return
	}
	if limit < total {
		return
	}

	stepCount(total + 1)
	stepCount(total + 2)
}
0