結果

問題 No.83 最大マッチング
ユーザー YamaKasaYamaKasa
提出日時 2018-04-19 16:13:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 410 ms / 5,000 ms
コード長 445 bytes
コンパイル時間 3,962 ms
コンパイル使用メモリ 72,092 KB
実行使用メモリ 64,812 KB
最終ジャッジ日時 2023-09-09 11:44:27
合計ジャッジ時間 7,427 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,596 KB
testcase_01 AC 128 ms
55,256 KB
testcase_02 AC 125 ms
55,488 KB
testcase_03 AC 127 ms
55,824 KB
testcase_04 AC 126 ms
55,468 KB
testcase_05 AC 129 ms
55,752 KB
testcase_06 AC 128 ms
55,640 KB
testcase_07 AC 124 ms
55,592 KB
testcase_08 AC 127 ms
55,636 KB
testcase_09 AC 231 ms
59,896 KB
testcase_10 AC 373 ms
64,756 KB
testcase_11 AC 409 ms
64,716 KB
testcase_12 AC 410 ms
64,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		//System.out.println("数字");
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		if(N % 2 == 0) {
			int k = N / 2;
			for(int i = 0; i < k; i++) {
				System.out.print("1");
			}
		}else {
			System.out.print("7");
			int k = N / 2;
			for(int i = 0; i < k - 1; i++) {
				System.out.print("1");
			}
		}
	}
}
0