結果

問題 No.83 最大マッチング
ユーザー kenji_shioyakenji_shioya
提出日時 2016-07-01 01:04:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 314 ms / 5,000 ms
コード長 395 bytes
コンパイル時間 3,631 ms
コンパイル使用メモリ 76,120 KB
実行使用メモリ 45,904 KB
最終ジャッジ日時 2024-04-20 05:01:34
合計ジャッジ時間 5,890 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,624 KB
testcase_01 AC 120 ms
41,648 KB
testcase_02 AC 119 ms
41,208 KB
testcase_03 AC 109 ms
40,796 KB
testcase_04 AC 117 ms
41,232 KB
testcase_05 AC 118 ms
41,504 KB
testcase_06 AC 103 ms
41,168 KB
testcase_07 AC 119 ms
41,132 KB
testcase_08 AC 113 ms
41,204 KB
testcase_09 AC 150 ms
45,292 KB
testcase_10 AC 220 ms
45,392 KB
testcase_11 AC 314 ms
45,696 KB
testcase_12 AC 312 ms
45,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise139{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    String s = "";
    if(n % 2 == 0){
      for(int i = 0; i < n / 2; i++){
        s += "1";
      }
    }else{
      s += "7";
      for(int i = 0; i < n / 2 - 1; i++){
        s += "1";
      }
    }
    System.out.println(s);
  }
}
0