結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
purple_jwl
|
| 提出日時 | 2016-10-27 12:20:12 |
| 言語 | Scala(Beta) (3.6.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 10,057 ms |
| コンパイル使用メモリ | 270,884 KB |
| 実行使用メモリ | 65,528 KB |
| 最終ジャッジ日時 | 2024-06-29 19:40:34 |
| 合計ジャッジ時間 | 40,615 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 8 |
ソースコード
import scala.io.StdIn
import scala.collection.mutable.ArrayBuffer
object Main {
def main(args: Array[String]): Unit = {
var n = StdIn.readLong
val memo = ArrayBuffer[Int]()
for (i <- (2 to Math.sqrt(n).toInt + 1)) {
while (n % i == 0) {
memo += i
n /= i
}
}
println(
if (memo.size > 2) "YES" else "NO"
)
}
}
purple_jwl