結果

問題 No.83 最大マッチング
ユーザー spacia
提出日時 2015-12-19 12:52:58
言語 Java
(openjdk 23)
結果
AC  
実行時間 265 ms / 5,000 ms
コード長 465 bytes
コンパイル時間 2,168 ms
コンパイル使用メモリ 75,480 KB
実行使用メモリ 42,856 KB
最終ジャッジ日時 2024-09-16 08:55:36
合計ジャッジ時間 4,068 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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