結果

問題 No.1020 Reverse
ユーザー Keisuke KubotaKeisuke Kubota
提出日時 2020-04-10 22:36:57
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 15,511 ms
コンパイル使用メモリ 203,176 KB
実行使用メモリ 7,912 KB
最終ジャッジ日時 2023-10-14 01:24:37
合計ジャッジ時間 19,257 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 2 ms
4,372 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 156 ms
5,604 KB
testcase_09 AC 132 ms
5,600 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 198 ms
5,608 KB
testcase_13 AC 200 ms
5,608 KB
testcase_14 WA -
testcase_15 AC 455 ms
7,912 KB
testcase_16 AC 459 ms
7,912 KB
testcase_17 AC 194 ms
5,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
  "fmt"
)

func main() {
  var (
    n,k int
    str string
  )
  fmt.Scan(&n)
  fmt.Scan(&k)
  fmt.Scan(&str)
  if n==k {
    for i:=n; i>0; i-- {
      fmt.Print(str[i-1:i])
    }
  } else {
    fmt.Println(str[k-1:]+str[:k-1])
  }
}
0