結果

問題 No.83 最大マッチング
ユーザー kusagame12
提出日時 2023-11-17 19:24:03
言語 Java
(openjdk 23)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 2,791 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 41,628 KB
最終ジャッジ日時 2024-09-26 05:32:05
合計ジャッジ時間 5,725 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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