結果

問題 No.83 最大マッチング
ユーザー wagasa2wagasa2
提出日時 2018-04-19 13:49:24
言語 Java19
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 328 bytes
コンパイル時間 3,363 ms
コンパイル使用メモリ 71,580 KB
実行使用メモリ 56,248 KB
最終ジャッジ日時 2023-09-09 11:39:32
合計ジャッジ時間 5,870 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,864 KB
testcase_01 AC 119 ms
55,860 KB
testcase_02 AC 119 ms
55,768 KB
testcase_03 AC 118 ms
55,720 KB
testcase_04 AC 120 ms
56,012 KB
testcase_05 AC 120 ms
55,620 KB
testcase_06 AC 119 ms
56,036 KB
testcase_07 AC 120 ms
55,780 KB
testcase_08 AC 122 ms
55,896 KB
testcase_09 AC 130 ms
55,348 KB
testcase_10 AC 134 ms
56,032 KB
testcase_11 AC 135 ms
56,248 KB
testcase_12 AC 135 ms
56,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		StringBuilder sb = new StringBuilder();

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