結果

問題 No.83 最大マッチング
ユーザー spaciaspacia
提出日時 2015-12-19 12:50:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 465 bytes
コンパイル時間 2,062 ms
コンパイル使用メモリ 73,504 KB
実行使用メモリ 54,844 KB
最終ジャッジ日時 2023-10-14 14:17:47
合計ジャッジ時間 4,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
49,652 KB
testcase_01 AC 45 ms
49,884 KB
testcase_02 AC 49 ms
49,612 KB
testcase_03 WA -
testcase_04 AC 48 ms
50,168 KB
testcase_05 WA -
testcase_06 AC 49 ms
49,620 KB
testcase_07 WA -
testcase_08 AC 48 ms
49,860 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 268 ms
54,572 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(ans + add);
	}
}
0