結果
| 問題 | 
                            No.1020 Reverse
                             | 
                    
| コンテスト | |
| ユーザー | 
                             n_gojo
                         | 
                    
| 提出日時 | 2020-04-13 13:18:14 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 596 bytes | 
| コンパイル時間 | 3,863 ms | 
| コンパイル使用メモリ | 74,616 KB | 
| 実行使用メモリ | 58,556 KB | 
| 最終ジャッジ日時 | 2024-09-24 18:50:05 | 
| 合計ジャッジ時間 | 8,226 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 1 RE * 2 | 
| other | RE * 15 | 
ソースコード
import java.time.LocalDate;
import java.util.Scanner;
public class No1020 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        char[] c = str.toCharArray();
        char[] newC = new char[n];
        for(int i=0;i<(n-k+1);i++) {
            for(int j=i;j<(k+i);j++){
                newC[k-j]=c[k];
            }
            c=newC;
        }
        for(char c1 : c) {
            System.out.println(c1);
        }
        System.out.println("");
    }
}
            
            
            
        
            
n_gojo