結果

問題 No.83 最大マッチング
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-10 11:26:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 3,642 ms
コンパイル使用メモリ 71,428 KB
実行使用メモリ 66,552 KB
最終ジャッジ日時 2023-09-17 19:08:53
合計ジャッジ時間 7,070 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,500 KB
testcase_01 WA -
testcase_02 AC 123 ms
56,052 KB
testcase_03 AC 123 ms
55,928 KB
testcase_04 AC 125 ms
55,884 KB
testcase_05 AC 125 ms
55,368 KB
testcase_06 AC 125 ms
55,980 KB
testcase_07 AC 126 ms
56,084 KB
testcase_08 AC 124 ms
55,744 KB
testcase_09 AC 229 ms
60,136 KB
testcase_10 AC 368 ms
65,368 KB
testcase_11 AC 446 ms
66,552 KB
testcase_12 AC 431 ms
66,096 KB
権限があれば一括ダウンロードができます

ソースコード

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 l = n/2;
            for(int i=0; i<l-1; i++){
                System.out.print(1);
            }
        }else{
            int l =(n-1)/2;
            System.out.print(7);
            for(int i=1; i<l-1; i++){
                System.out.print(1);
            }
        }
        System.out.println(1);
    }
}
0