結果
| 問題 |
No.1747 Many Formulae 2
|
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2025-07-03 02:49:01 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 14,606 ms |
| コンパイル使用メモリ | 245,640 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-07-03 02:49:17 |
| 合計ジャッジ時間 | 15,155 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
package main
import . "fmt"
import . "math/big"
func main() {
var s string
Scan(&s)
ans := 0
for bp := 0; bp < (1<<len(s))/2; bp++ {
x, y := 0, 0
for i, c := range s {
x = x * 10 + int(c) - '0'
if ((bp>>i)&1) == 1 {
y += x
x = 0
}
}
y += x
// println(Sprintf("%010b:%d", bp, y))
if NewInt(int64(y)).ProbablyPrime(0) {
ans++
}
}
Println(ans)
}
ID 21712