結果
問題 | No.964 2020 |
ユーザー | 👑 naipia |
提出日時 | 2020-01-13 20:23:39 |
言語 | Go (1.21.3) |
結果 |
AC
|
実行時間 | 2 ms / 2,020 ms |
コード長 | 855 bytes |
コンパイル時間 | 13,605 ms |
コンパイル使用メモリ | 216,192 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-23 12:53:07 |
合計ジャッジ時間 | 14,441 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,376 KB |
testcase_06 | AC | 1 ms
4,376 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 2 ms
4,380 KB |
testcase_09 | AC | 2 ms
4,380 KB |
ソースコード
package main import ( "fmt" "bufio" "os" "strconv" ) //=====I/O===== var ( sc = bufio.NewScanner(os.Stdin) wr = bufio.NewWriter(os.Stdout) ) func scanInt() int { sc.Scan() a,_ := strconv.Atoi(sc.Text()) return a } func scanInt64() int64 { sc.Scan() a,_ := strconv.ParseInt(sc.Text(),10,64) return a } func scanInts(n int) []int { res := make([]int, n) for i := 0; i < n; i++ { res[i] = scanInt() } return res } func scanText() string { sc.Scan() return sc.Text() } func printInts(a ...int) { for i, e := range a { fmt.Fprint(wr, e) if i != len(a)-1 { fmt.Fprint(wr, " ") } } fmt.Fprintln(wr) wr.Flush() } //=====main===== func main() { sc.Split(bufio.ScanWords) n := scanInt() if n==1 { fmt.Println(1) return } for i := 0; i < n; i++ { for j := 0; j < n; j++ { fmt.Print(n-i-1) } } fmt.Println() }