結果

問題 No.83 最大マッチング
ユーザー kusagame12kusagame12
提出日時 2023-11-17 19:24:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 77,272 KB
実行使用メモリ 57,968 KB
最終ジャッジ日時 2023-11-17 19:24:08
合計ジャッジ時間 4,993 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,836 KB
testcase_01 AC 129 ms
57,968 KB
testcase_02 AC 128 ms
57,892 KB
testcase_03 AC 129 ms
57,872 KB
testcase_04 AC 128 ms
57,960 KB
testcase_05 AC 129 ms
57,820 KB
testcase_06 AC 127 ms
57,840 KB
testcase_07 AC 126 ms
57,964 KB
testcase_08 AC 119 ms
56,684 KB
testcase_09 AC 151 ms
57,744 KB
testcase_10 AC 134 ms
57,736 KB
testcase_11 AC 159 ms
57,952 KB
testcase_12 AC 141 ms
57,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        
        int roopCnt = n / 2;
        if(n % 2 != 0){
            sb.append(7);
            roopCnt--;
        }
        
        for(int i = 0 ; i < roopCnt ; i++){
            sb.append(1);
        } 
         
        System.out.println(sb); 
         
    }
    
}
0