結果

問題 No.83 最大マッチング
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 05:49:33
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 555 bytes
コンパイル時間 1,948 ms
コンパイル使用メモリ 71,248 KB
実行使用メモリ 68,820 KB
最終ジャッジ日時 2023-08-16 18:22:41
合計ジャッジ時間 5,584 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,040 KB
testcase_01 AC 121 ms
55,996 KB
testcase_02 AC 123 ms
56,004 KB
testcase_03 WA -
testcase_04 AC 121 ms
55,576 KB
testcase_05 WA -
testcase_06 AC 121 ms
56,264 KB
testcase_07 WA -
testcase_08 AC 121 ms
56,096 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 432 ms
65,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        if(N==2){
            System.out.println(1);
        }else if(N==3){
            System.out.println(7);
        }else{
            while(N>=4){
                System.out.print(1);
                N=N-2;
            }
            if(N==2){
                System.out.println(1);
            }else if(N==3){
                System.out.println(7);
            }
        }
    }
}
0