結果

問題 No.1841 Long Long
ユーザー sysnote8mainsysnote8main
提出日時 2023-05-07 17:11:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 3,310 ms
コンパイル使用メモリ 74,560 KB
実行使用メモリ 54,192 KB
最終ジャッジ日時 2024-05-03 15:14:20
合計ジャッジ時間 5,205 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
53,008 KB
testcase_01 AC 127 ms
53,812 KB
testcase_02 AC 120 ms
54,192 KB
testcase_03 AC 105 ms
52,684 KB
testcase_04 AC 115 ms
53,928 KB
testcase_05 AC 113 ms
53,960 KB
testcase_06 AC 112 ms
53,932 KB
testcase_07 AC 116 ms
53,744 KB
testcase_08 AC 102 ms
52,752 KB
testcase_09 AC 110 ms
53,852 KB
testcase_10 AC 109 ms
53,676 KB
testcase_11 AC 119 ms
53,760 KB
testcase_12 AC 107 ms
52,560 KB
testcase_13 AC 115 ms
54,136 KB
testcase_14 AC 111 ms
53,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Repeat_String {
    public static String StrRepeater(int repeats, String msg) {
        return msg.repeat(Math.max(0, repeats));
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(StrRepeater(n,"Long"));
    }
}
0