結果

問題 No.857 素振り
コンテスト
ユーザー kat0rik
提出日時 2019-08-11 17:27:31
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
WA  
実行時間 -
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 16,025 ms
コンパイル使用メモリ 284,680 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-04 07:34:26
合計ジャッジ時間 11,018 ms
ジャッジサーバーID
(参考情報)
judge5_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import "fmt"

func main() {
	var x, y, z int
	fmt.Scan(&x, &y, &z) // always x < y
	if z <= x {
		fmt.Println(0)
	} else { // x < y && x < z
		if z == y {
			fmt.Println(z - x - 1)
		} else {
			fmt.Println(z - x + 1)
		}
	}
}
0