結果

問題 No.83 最大マッチング
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-15 09:52:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 3,314 ms
コンパイル使用メモリ 72,120 KB
実行使用メモリ 56,212 KB
最終ジャッジ日時 2023-08-26 20:14:56
合計ジャッジ時間 6,051 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,160 KB
testcase_01 AC 125 ms
56,016 KB
testcase_02 AC 123 ms
55,768 KB
testcase_03 AC 123 ms
55,724 KB
testcase_04 AC 121 ms
56,212 KB
testcase_05 AC 123 ms
55,756 KB
testcase_06 AC 126 ms
56,036 KB
testcase_07 AC 124 ms
56,072 KB
testcase_08 AC 125 ms
55,524 KB
testcase_09 AC 134 ms
55,960 KB
testcase_10 AC 138 ms
55,808 KB
testcase_11 AC 139 ms
56,024 KB
testcase_12 AC 137 ms
54,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No83 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int N = sc.nextInt();
		
		if(N % 2 == 1) {
			sb.append(7);
			N -= 3;
		}
		for(int i = 1;i <= N/2;i++) {
			sb.append(1);
		}
		System.out.println(sb);
	}
}
0