結果

問題 No.857 素振り
コンテスト
ユーザー kat0rik
提出日時 2019-08-11 17:27:31
言語 Go
(1.27.0 + ACL)
コンパイル:
/usr/bin/go_c
実行:
./Main
結果
WA  
実行時間 -
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,404 ms
コンパイル使用メモリ 287,176 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-26 11:21:17
合計ジャッジ時間 11,764 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_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