結果

問題 No.83 最大マッチング
ユーザー kuramukuramu
提出日時 2016-01-21 19:59:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 74,844 KB
実行使用メモリ 54,700 KB
最終ジャッジ日時 2023-10-21 13:42:12
合計ジャッジ時間 3,661 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
53,520 KB
testcase_01 AC 57 ms
53,508 KB
testcase_02 AC 57 ms
52,408 KB
testcase_03 AC 57 ms
53,512 KB
testcase_04 AC 55 ms
52,432 KB
testcase_05 WA -
testcase_06 AC 56 ms
52,400 KB
testcase_07 WA -
testcase_08 AC 55 ms
53,496 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 82 ms
54,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(stdReader.readLine());
		StringBuilder sb = new StringBuilder();
		if(n%2==0){
			for(int i=0;i<n/2;i++) sb.append("1"); 
		}else{
			while(n>2){
				sb.append("7");
				n-=3;
			}
			if(n==2) sb.append("1");
		}
		System.out.println(sb.toString());
	}
}
0