結果

問題 No.83 最大マッチング
ユーザー jimanojimano
提出日時 2017-05-07 17:48:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 3,655 ms
コンパイル使用メモリ 71,976 KB
実行使用メモリ 51,152 KB
最終ジャッジ日時 2023-10-12 16:11:44
合計ジャッジ時間 4,777 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,164 KB
testcase_01 AC 45 ms
49,600 KB
testcase_02 AC 42 ms
49,256 KB
testcase_03 AC 43 ms
49,280 KB
testcase_04 AC 44 ms
49,332 KB
testcase_05 AC 43 ms
49,288 KB
testcase_06 AC 43 ms
49,412 KB
testcase_07 AC 42 ms
49,348 KB
testcase_08 AC 42 ms
49,196 KB
testcase_09 AC 44 ms
49,200 KB
testcase_10 AC 63 ms
50,864 KB
testcase_11 AC 61 ms
51,152 KB
testcase_12 AC 61 ms
50,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int n = Integer.parseInt(br.readLine());
			int sum = 0;
			StringBuilder sb = new StringBuilder();

			if (n % 2 != 0) {
				sb.append(7);
				n -= 3;
			}
			for (int i = 0; i < n / 2; i++) {
				sb.append(1);
			}

			System.out.println(sb);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0