結果

問題 No.83 最大マッチング
ユーザー itezpaceitezpace
提出日時 2016-08-22 16:31:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 301 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 2,845 ms
コンパイル使用メモリ 75,976 KB
実行使用メモリ 45,592 KB
最終ジャッジ日時 2024-04-25 11:16:34
合計ジャッジ時間 4,585 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
41,320 KB
testcase_01 AC 111 ms
41,296 KB
testcase_02 AC 104 ms
40,140 KB
testcase_03 AC 114 ms
41,472 KB
testcase_04 AC 109 ms
41,252 KB
testcase_05 AC 102 ms
40,088 KB
testcase_06 AC 114 ms
41,192 KB
testcase_07 AC 108 ms
40,292 KB
testcase_08 AC 105 ms
40,320 KB
testcase_09 AC 119 ms
44,296 KB
testcase_10 AC 217 ms
45,528 KB
testcase_11 AC 283 ms
44,876 KB
testcase_12 AC 301 ms
45,592 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