結果
問題 | No.1636 森 |
ユーザー |
|
提出日時 | 2022-07-09 16:45:22 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 11,303 ms |
コンパイル使用メモリ | 221,208 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 04:17:48 |
合計ジャッジ時間 | 12,398 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
package mainimport ("bufio""fmt""os""strconv")var sc = bufio.NewScanner(os.Stdin)var out = bufio.NewWriter(os.Stdout)func main() {buf := make([]byte, 1024*1024)sc.Buffer(buf, bufio.MaxScanTokenSize)sc.Split(bufio.ScanWords)n := nextInt()ans := (n - 1) * (n - 1)PrintInt(ans)}func nextInt() int {sc.Scan()i, _ := strconv.Atoi(sc.Text())return i}func PrintInt(x int) {defer out.Flush()fmt.Fprintln(out, x)}