結果

問題 No.410 出会い
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2022-06-26 19:31:09
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 11,006 ms
コンパイル使用メモリ 225,004 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-28 14:26:03
合計ジャッジ時間 11,942 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 WA -
testcase_13 AC 1 ms
5,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main() {
	var px, py, qx, qy int
	fmt.Scan(&px, &py, &qx, &qy)

	x_diff := abs(px - qx)
	y_diff := abs(py - qy)

	t2 := x_diff + y_diff

	t := t2/2 + t2%2
	fmt.Println(t)
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}
0