結果

問題 No.83 最大マッチング
ユーザー tsunabittsunabit
提出日時 2018-08-19 14:14:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 421 ms / 5,000 ms
コード長 526 bytes
コンパイル時間 3,491 ms
コンパイル使用メモリ 76,248 KB
実行使用メモリ 50,320 KB
最終ジャッジ日時 2024-04-28 13:13:10
合計ジャッジ時間 6,858 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
40,784 KB
testcase_01 AC 128 ms
41,248 KB
testcase_02 AC 134 ms
41,296 KB
testcase_03 AC 128 ms
41,272 KB
testcase_04 AC 118 ms
39,912 KB
testcase_05 AC 135 ms
41,272 KB
testcase_06 AC 128 ms
41,072 KB
testcase_07 AC 133 ms
41,292 KB
testcase_08 AC 116 ms
40,200 KB
testcase_09 AC 223 ms
44,848 KB
testcase_10 AC 365 ms
49,932 KB
testcase_11 AC 421 ms
50,320 KB
testcase_12 AC 417 ms
50,160 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