結果

問題 No.1992 Tendon Walk
ユーザー 転生チートなし転生チートなし
提出日時 2024-10-15 21:07:11
言語 Go
(1.22.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 12,754 ms
コンパイル使用メモリ 228,848 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 21:07:25
合計ジャッジ時間 13,648 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

package main

import . "fmt"
import . "os"

var x,p,t int

func a() {
	p+=2
	t+=2
	c()
}
func b() {
	p-=1
	t+=1
	c()
}
func c() {
	if p==x {
		Println(t)
		Exit(0)
	}
}

func main() {
	Scan(&x)
	p,t=0,0
	for {
		a()
		a()
		b()
		b()
		a()
		b()
		b()
	}
}
0