結果

問題 No.83 最大マッチング
ユーザー reon777reon777
提出日時 2017-06-21 22:53:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 390 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 2,971 ms
コンパイル使用メモリ 74,364 KB
実行使用メモリ 63,640 KB
最終ジャッジ日時 2024-04-10 10:03:33
合計ジャッジ時間 6,171 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
53,824 KB
testcase_01 AC 121 ms
54,020 KB
testcase_02 AC 123 ms
54,296 KB
testcase_03 AC 116 ms
54,232 KB
testcase_04 AC 120 ms
54,076 KB
testcase_05 AC 137 ms
52,912 KB
testcase_06 AC 121 ms
53,896 KB
testcase_07 AC 115 ms
53,856 KB
testcase_08 AC 115 ms
54,056 KB
testcase_09 AC 210 ms
57,572 KB
testcase_10 AC 324 ms
61,520 KB
testcase_11 AC 386 ms
63,560 KB
testcase_12 AC 390 ms
63,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class HelloWorld
{
  public static void main( String[] args )
  {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int keta = 0;
    int i = N;

    if(N%2 == 0){
      while(i>0){
        System.out.print("1");
        i = i-2;
      }
    }else{
      System.out.print("7");
      i = i-3;
      while(i>0){
        System.out.print("1");
        i = i-2;
      }
    }
  }
}
0