結果

問題 No.1020 Reverse
ユーザー joybeeee
提出日時 2020-05-13 22:19:49
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 2,266 ms
コンパイル使用メモリ 76,244 KB
実行使用メモリ 56,632 KB
最終ジャッジ日時 2024-09-14 15:42:44
合計ジャッジ時間 6,855 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int k = sc.nextInt();
      String s = sc.next();
      int len = n - k + 1;
      String str1 = s.substring(0, k-1);
      String str2 = s.substring(k-1, n);
      System.out.println(str2 + str1);
  }
}
0