結果
| 問題 | No.442 和と積 | 
| コンテスト | |
| ユーザー |  💕💖💞 | 
| 提出日時 | 2016-11-19 21:11:37 | 
| 言語 | Go (1.23.4) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 627 bytes | 
| コンパイル時間 | 14,080 ms | 
| コンパイル使用メモリ | 222,292 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-04 22:42:47 | 
| 合計ジャッジ時間 | 14,845 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
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]
  op_sum, op_mul := big.NewInt(0), big.NewInt(0)
  op_sum.Add(&a, &b)
  op_mul.Mul(&a, &b)
  fmt.Println(new(big.Int).GCD(nil, nil, op_sum, op_mul))
}
            
            
            
        