結果

問題 No.892 タピオカ
ユーザー penne_
提出日時 2019-12-30 16:30:40
言語 Go
(1.23.4)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 18,496 ms
コンパイル使用メモリ 236,356 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 18:12:01
合計ジャッジ時間 16,458 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

func main()  {
	sc := bufio.NewScanner(os.Stdin)
	var s string
	if sc.Scan() {
		s = sc.Text()
	}
	slice := strings.Split(s, " ")
	sum := 0.0
	for i := 0; i < len(slice); i += 2 {
		a, _ := strconv.Atoi(slice[i])
		b, _ := strconv.Atoi(slice[i + 1])
		sum += math.Pow(float64(a), float64(b))
	}
	t := int64(sum) % 2
	if t != 0 {
		fmt.Print(":-(")
	} else {
		fmt.Print(":-)")
	}
}
0