結果

問題 No.83 最大マッチング
ユーザー villachvillach
提出日時 2017-09-19 15:52:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 446 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 2,958 ms
コンパイル使用メモリ 71,916 KB
実行使用メモリ 66,396 KB
最終ジャッジ日時 2023-08-08 00:03:07
合計ジャッジ時間 6,299 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,076 KB
testcase_01 AC 119 ms
55,672 KB
testcase_02 AC 120 ms
55,776 KB
testcase_03 AC 120 ms
55,424 KB
testcase_04 AC 120 ms
56,212 KB
testcase_05 AC 119 ms
55,976 KB
testcase_06 AC 118 ms
55,652 KB
testcase_07 AC 118 ms
55,824 KB
testcase_08 AC 116 ms
55,812 KB
testcase_09 AC 222 ms
60,032 KB
testcase_10 AC 359 ms
65,276 KB
testcase_11 AC 446 ms
66,076 KB
testcase_12 AC 445 ms
66,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N83 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long c1 = 0;
		long c2 = 0;
		if(n % 2 == 0){
			c1 = n / 2;
			for(long i = 0;i < c1;++i){
				System.out.print(1);
			}
		}else{
			c1 = n / 2 - 1;
			c2 = 1;
			System.out.print(7);
			for(long i = 0;i < c1;++i){
				System.out.print(1);
			}
		}
	}
}
0