結果

問題 No.643 Two Operations No.2
ユーザー tsuchinaga
提出日時 2019-03-06 13:29:29
言語 Go
(1.23.4)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 10,813 ms
コンパイル使用メモリ 228,008 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 14:34:04
合計ジャッジ時間 11,632 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main() {
	var x, y int
	_, _ = fmt.Scan(&x, &y)

	ans := -1
	if x == y {
		ans = 0
	} else if x == 0 {
		ans = 2
	} else if y == 0 {
		ans = 1
	} else if x == y*-1 {
		ans = 3
	}
	fmt.Println(ans)
}
0