結果
| 問題 |
No.785 色食い虫
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-23 21:11:40 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 455 bytes |
| コンパイル時間 | 14,906 ms |
| コンパイル使用メモリ | 238,952 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-24 17:54:58 |
| 合計ジャッジ時間 | 16,079 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
total := 1
for i := 0; i < 3; i++ {
hexNum := 16
line := readLine(sc)
if line == "NONE" {
total *= hexNum * hexNum // total * F * F
continue
}
rmNum := len(strings.Split(line, ","))
hexNum -= rmNum
total *= hexNum * hexNum
}
fmt.Println(total)
}
func readLine(sc *bufio.Scanner) string {
sc.Scan()
return sc.Text()
}