結果

問題 No.83 最大マッチング
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-07 01:42:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 332 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 2,198 ms
コンパイル使用メモリ 80,808 KB
実行使用メモリ 59,980 KB
最終ジャッジ日時 2023-10-21 19:34:07
合計ジャッジ時間 5,351 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
57,332 KB
testcase_01 AC 133 ms
57,412 KB
testcase_02 AC 138 ms
57,412 KB
testcase_03 AC 137 ms
57,564 KB
testcase_04 AC 137 ms
57,376 KB
testcase_05 AC 135 ms
57,284 KB
testcase_06 AC 136 ms
57,532 KB
testcase_07 AC 136 ms
57,492 KB
testcase_08 AC 136 ms
57,500 KB
testcase_09 AC 162 ms
59,980 KB
testcase_10 AC 247 ms
59,928 KB
testcase_11 AC 332 ms
59,892 KB
testcase_12 AC 329 ms
59,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();

		String ans = "";
		if(n % 2 == 1) {
			ans = "7";
			n -= 3;
		}
		for(int i=0; i<n; i+=2) {
			ans += "1";
		}

		System.out.println(ans);
	}
}
0