結果
問題 | No.1828 Except 3 |
ユーザー |
|
提出日時 | 2022-10-20 20:46:57 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 590 bytes |
コンパイル時間 | 14,360 ms |
コンパイル使用メモリ | 237,776 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 12:04:43 |
合計ジャッジ時間 | 14,858 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
package mainimport ("bufio""fmt""os""strconv""strings")func main() {sc := bufio.NewScanner(os.Stdin)sc.Buffer(make([]byte, 10000*11+2), 10000*11+2)sc.Scan()N, _ := strconv.Atoi(sc.Text())sc.Scan()aa := strings.Fields(sc.Text())sc.Scan()bb := strings.Fields(sc.Text())sc.Scan()cc := strings.Fields(sc.Text())a, b, c := 0, 0, 0for i := 0; i < N; i++ {A, _ := strconv.Atoi(aa[i])B, _ := strconv.Atoi(bb[i])C, _ := strconv.Atoi(cc[i])if A%3 != 0 {a++}if B%3 != 0 {b++}if C%3 != 0 {c++}}fmt.Println(a * b * c)}