結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
49,696 KB
testcase_01 AC 51 ms
49,704 KB
testcase_02 AC 48 ms
49,592 KB
testcase_03 AC 52 ms
49,724 KB
testcase_04 WA -
testcase_05 AC 52 ms
50,184 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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 add = "", ans = "";
		if (n % 3 == 0)
			cnt = n / 3;
		else if (n % 3 == 1) {
			cnt = (n - 4) / 3;
			add = "11";
		} else {
			cnt = n / 3;
			add = "1";
		}
		for (int i = 0; i < cnt; i++)
			ans += "7";
		
		System.out.println(ans + add);
	}
}
0