結果

問題 No.83 最大マッチング
ユーザー chiho_miyako
提出日時 2015-04-10 11:29:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 439 ms / 5,000 ms
コード長 618 bytes
コンパイル時間 2,135 ms
コンパイル使用メモリ 75,024 KB
実行使用メモリ 64,328 KB
最終ジャッジ日時 2024-07-04 13:31:29
合計ジャッジ時間 5,217 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        int n = koko.nextInt();
        if(n%2==0){
            int lg = n/2;
            for(int i=0; i<lg-1; i++){
                System.out.print(1);
            }
            System.out.println(1);
        }else{
            int lk =(n-3)/2;
            System.out.print(7);
            if(n-3>0){
               for(int i=0; i<lk-1; i++){
                System.out.print(1);
               }
               System.out.println(1);
            }
        }
    }
}
0