結果

問題 No.83 最大マッチング
ユーザー takeya_okino
提出日時 2017-06-20 18:06:21
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 2,263 ms
コンパイル使用メモリ 76,108 KB
実行使用メモリ 46,280 KB
最終ジャッジ日時 2024-10-02 07:32:37
合計ジャッジ時間 5,143 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int k = N / 6;
    int r = N % 6;
    String ans = "";
    for(int i = 0; i < k; i++) {
      ans += "111";
    }
    if(r == 5) ans = "7" + ans + "1";
    if(r == 4) ans = ans + "11";
    if(r == 3) ans = "7" + ans;
    if(r == 2) ans = ans + "1"; 
    System.out.println(ans);
  }
}
0