結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-28 22:01:25 |
| 言語 | Scala(Beta) (3.6.2) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 484 bytes |
| 記録 | |
| コンパイル時間 | 8,192 ms |
| コンパイル使用メモリ | 255,420 KB |
| 実行使用メモリ | 457,976 KB |
| 最終ジャッジ日時 | 2025-12-19 02:41:25 |
| 合計ジャッジ時間 | 20,715 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 25 |
ソースコード
import java.util.Scanner
import scala.collection.mutable._
object no36{
def main(args:Array[String]):Unit = {
var n = scala.io.StdIn.readLong
val res = ListBuffer[Int]()
for(i <- 2 to (Math.sqrt(n).toInt+1)){
while(n%i == 0){
res += i
n /= i
}
}
if(n != 1) res += n.toInt
if(2 < res.size){
println("YES")
}else{
println("NO")
}
}
}