結果

問題 No.83 最大マッチング
ユーザー spaciaspacia
提出日時 2015-12-19 12:52:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 275 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 73,536 KB
実行使用メモリ 54,700 KB
最終ジャッジ日時 2023-10-14 14:17:51
合計ジャッジ時間 3,888 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
49,876 KB
testcase_01 AC 45 ms
49,808 KB
testcase_02 AC 49 ms
49,608 KB
testcase_03 AC 48 ms
50,036 KB
testcase_04 AC 49 ms
49,912 KB
testcase_05 AC 49 ms
49,796 KB
testcase_06 AC 49 ms
49,840 KB
testcase_07 AC 48 ms
50,000 KB
testcase_08 AC 49 ms
49,628 KB
testcase_09 AC 66 ms
53,092 KB
testcase_10 AC 180 ms
54,636 KB
testcase_11 AC 274 ms
54,592 KB
testcase_12 AC 275 ms
54,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main155 {
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		int cnt = 0;
		String ans = "", add = "";
		
		if (n % 2 == 0)
			cnt = n / 2;
		else {
			cnt = (n - 3) / 2;
			add = "7";
		}
		
		for (int i = 0; i < cnt; i++)
			ans += "1";
		
		System.out.println(add + ans);
	}
}
0