結果

問題 No.83 最大マッチング
ユーザー tsunabittsunabit
提出日時 2018-08-19 14:14:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 372 ms / 5,000 ms
コード長 526 bytes
コンパイル時間 4,655 ms
コンパイル使用メモリ 72,800 KB
実行使用メモリ 64,696 KB
最終ジャッジ日時 2023-08-10 19:57:08
合計ジャッジ時間 7,772 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
55,984 KB
testcase_01 AC 115 ms
56,276 KB
testcase_02 AC 113 ms
55,804 KB
testcase_03 AC 115 ms
55,944 KB
testcase_04 AC 119 ms
55,676 KB
testcase_05 AC 114 ms
56,004 KB
testcase_06 AC 111 ms
56,236 KB
testcase_07 AC 112 ms
56,016 KB
testcase_08 AC 116 ms
56,104 KB
testcase_09 AC 222 ms
60,316 KB
testcase_10 AC 331 ms
64,624 KB
testcase_11 AC 372 ms
64,680 KB
testcase_12 AC 364 ms
64,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;
import java.time.*;
import java.time.format.*;

public class No83 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if(n%2 == 0) {
            for(int i = 0; i < n/2 ;i++) {
                System.out.print("1");
            }
        }else {
            System.out.print("7");
            for(int i = 0 ; i < (n-2)/2 ; i++) {
                System.out.print("1");
            }
        }
	}
}
0