結果

問題 No.83 最大マッチング
ユーザー itezpaceitezpace
提出日時 2016-08-22 16:31:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 342 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 1,936 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 58,500 KB
最終ジャッジ日時 2023-08-07 17:41:01
合計ジャッジ時間 4,985 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,280 KB
testcase_01 AC 122 ms
56,028 KB
testcase_02 AC 122 ms
55,932 KB
testcase_03 AC 122 ms
55,824 KB
testcase_04 AC 122 ms
56,060 KB
testcase_05 AC 124 ms
56,008 KB
testcase_06 AC 123 ms
55,724 KB
testcase_07 AC 123 ms
56,208 KB
testcase_08 AC 122 ms
55,752 KB
testcase_09 AC 149 ms
58,348 KB
testcase_10 AC 245 ms
58,276 KB
testcase_11 AC 342 ms
57,800 KB
testcase_12 AC 340 ms
58,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Yuki83 {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = "";
    int a = n/2;
    int b = n%2;
    int c = 0;
    if(b==1){
      a-=1;
      c=1;
    }
    if(c==1){
      s+='7';
    }
    for(int i=0; i<a; ++i){
      s+='1';
    }
    System.out.println(s);
  }
}
0