結果

問題 No.83 最大マッチング
ユーザー scachescache
提出日時 2014-12-02 23:28:17
言語 Java19
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 3,756 ms
コンパイル使用メモリ 72,204 KB
実行使用メモリ 57,908 KB
最終ジャッジ日時 2023-09-02 01:06:39
合計ジャッジ時間 5,759 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,596 KB
testcase_01 AC 122 ms
55,792 KB
testcase_02 AC 122 ms
55,968 KB
testcase_03 AC 122 ms
55,876 KB
testcase_04 AC 124 ms
53,940 KB
testcase_05 AC 124 ms
55,732 KB
testcase_06 AC 123 ms
56,040 KB
testcase_07 AC 124 ms
55,752 KB
testcase_08 AC 122 ms
55,464 KB
testcase_09 AC 132 ms
55,896 KB
testcase_10 AC 138 ms
55,840 KB
testcase_11 AC 139 ms
57,908 KB
testcase_12 AC 139 ms
56,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main83 {
	public static void main(String[] args) {
		Main83 p = new Main83();
	}

	public Main83() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		solve(n);
	}

	public void solve(int n) {
		StringBuilder sb = new StringBuilder();
		if(n%2==0){
			n-=2;
			sb.append('1');
		}else{
			n-=3;
			sb.append('7');
		}
		
		for(int i=n;i>0;i-=2){
			sb.append('1');
		}
		
		System.out.println(sb.toString());
	}

}
0