結果
| 問題 | No.441 和か積 | 
| コンテスト | |
| ユーザー |  💕💖💞 | 
| 提出日時 | 2016-11-18 06:22:08 | 
| 言語 | Go (1.23.4) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,283 bytes | 
| コンパイル時間 | 16,505 ms | 
| コンパイル使用メモリ | 231,940 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-27 03:36:38 | 
| 合計ジャッジ時間 | 17,465 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
package main
import (
        "bufio"
        "fmt"
        _ "math"
        "math/big"
        "os"
        _ "strconv"
        "strings"
)
func main() {
        scanner := bufio.NewScanner(os.Stdin)
        holder := []big.Int{}
        th := 0
        for scanner.Scan() {
                th += 1
                text := scanner.Text()
                for _, x2 := range strings.Split(text, " ") {
                        bigint := *big.NewInt(0)
                        bigint.SetString(x2, 10)
                        holder = append(holder, bigint)
                }
                if th == 1 {
                        break
                }
        }
        a, b := holder[0], holder[1]
        //fmt.Printf("a %v\n", &a)
        //fmt.Printf("b %v\n", &b)
        op1 := big.NewInt(0)
        op2 := big.NewInt(0)
        op1.Add(&a, &b)
        op2.Mul(&a, &b)
        //fmt.Printf("cmp %v\n", add.Cmp(mul))
        //fmt.Printf("add %v\n", add)
        //fmt.Printf("mul %v\n", mul)
        if op1.Cmp(op2) == 1 {
                fmt.Printf("S")
                fmt.Println()
        } else if op1.Cmp(op2) == -1 {
                fmt.Printf("P")
                fmt.Println()
        } else {
                fmt.Printf("E")
                fmt.Println()
        }
}
            
            
            
        