結果

問題 No.83 最大マッチング
ユーザー GrenacheGrenache
提出日時 2015-09-23 01:07:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 631 bytes
コンパイル時間 3,180 ms
コンパイル使用メモリ 72,720 KB
実行使用メモリ 57,844 KB
最終ジャッジ日時 2023-09-26 14:33:31
合計ジャッジ時間 5,840 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,364 KB
testcase_01 AC 123 ms
55,444 KB
testcase_02 AC 121 ms
55,844 KB
testcase_03 WA -
testcase_04 AC 122 ms
56,356 KB
testcase_05 WA -
testcase_06 AC 124 ms
55,700 KB
testcase_07 WA -
testcase_08 AC 120 ms
55,716 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 135 ms
55,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder83 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        if (n % 2 == 0) {
        	StringBuilder sb = new StringBuilder();
        	for (int i = 0; i < n / 2; i++) {
        		sb.append('1');
        	}
        	System.out.println(sb);
        } else {
        	n -= 3;
        	StringBuilder sb = new StringBuilder();
        	for (int i = 0; i < n / 2; i++) {
        		sb.append('1');
        	}
        	sb.append('7');
        	System.out.println(sb);
        }

        sc.close();
    }
}
0