結果

問題 No.786 京都大学の過去問
コンテスト
ユーザー yasukotelin
提出日時 2019-03-23 21:39:14
言語 Go
(1.27.0)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
TLE  
実行時間 -
コード長 286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,331 ms
コンパイル使用メモリ 264,056 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-09-03 09:24:41
合計ジャッジ時間 14,775 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 TLE * 1 -- * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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