結果

問題 No.83 最大マッチング
ユーザー mos_13184925
提出日時 2018-06-30 12:44:49
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 74,524 KB
実行使用メモリ 54,312 KB
最終ジャッジ日時 2024-07-01 00:54:11
合計ジャッジ時間 4,453 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        if(n%2==0) ans+=1;
        else ans+=7;
        int m = (int)Math.ceil(n/2);
        for(int i=1; i<m; i++) {
            ans*=10;
            ans+=1;
        }
        System.out.println(ans);
    }
}
0