結果

問題 No.892 タピオカ
ユーザー Aoshi FujiokaAoshi Fujioka
提出日時 2019-09-27 21:50:25
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 870 bytes
コンパイル時間 13,740 ms
コンパイル使用メモリ 223,844 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 03:22:28
合計ジャッジ時間 11,862 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

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

var sc = bufio.NewScanner(os.Stdin)

func gets() string {
    sc.Scan()
    return sc.Text()
}

func toInt(value string) int64 {
    num, _ := strconv.ParseInt(value, 10, 64)
    return num
}

func splitWithInt(value string) []int64 {
    vals := strings.Split(value, " ")
    nums := make([]int64, len(vals))
    for index, elem := range vals {
        nums[index] = toInt(elem)
    }
    return nums
}

func main() {
    var inputs []int64
    var ans string
    inputs = splitWithInt(gets())
    tapi := math.Pow(float64(inputs[0]), float64(inputs[1])) + math.Pow(float64(inputs[2]), float64(inputs[3])) + math.Pow(float64(inputs[4]), float64(inputs[5]))
    if math.Mod(tapi, 2.0) == 0 {
        ans = ":-)"
    } else {
        ans = ":-("
    }
    fmt.Println(ans)
}
0