結果

問題 No.441 和か積
ユーザー HujiLeeHujiLee
提出日時 2016-12-26 14:01:14
言語 Scala(Beta)
(3.6.2)
結果
AC  
実行時間 853 ms / 1,000 ms
コード長 387 bytes
コンパイル時間 9,881 ms
コンパイル使用メモリ 266,472 KB
実行使用メモリ 63,448 KB
最終ジャッジ日時 2024-06-29 22:00:48
合計ジャッジ時間 38,648 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn

/**
  * Created by Administrator on 2016/12/26 0026.
  */
object Main  extends App{
  val bigInts: Array[BigInt] = StdIn.readLine().split(" ").map(x=>BigInt.apply(x))
  val sum = bigInts.reduce((x,y)=>x+y)
  val mul = bigInts.reduce((x,y)=>x*y)
  val cha = sum-mul
  if(cha>0){
    println("S")
  }else if(cha<0){
    println("P")
  }else{
    println("E")
  }


}
0