結果

問題 No.83 最大マッチング
ユーザー mos_13184925mos_13184925
提出日時 2018-06-30 12:42:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 1,859 ms
コンパイル使用メモリ 71,768 KB
実行使用メモリ 58,352 KB
最終ジャッジ日時 2023-09-13 16:16:25
合計ジャッジ時間 4,247 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,268 KB
testcase_01 AC 118 ms
55,476 KB
testcase_02 AC 119 ms
56,316 KB
testcase_03 WA -
testcase_04 AC 118 ms
55,780 KB
testcase_05 WA -
testcase_06 AC 118 ms
55,444 KB
testcase_07 WA -
testcase_08 AC 119 ms
55,916 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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+=Math.pow(10, i);
        }
        System.out.println(ans);
    }
}
0