結果

問題 No.83 最大マッチング
ユーザー villachvillach
提出日時 2017-09-19 15:52:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 432 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 3,468 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 64,320 KB
最終ジャッジ日時 2024-04-25 18:10:56
合計ジャッジ時間 6,809 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
54,056 KB
testcase_01 AC 132 ms
54,256 KB
testcase_02 AC 133 ms
54,504 KB
testcase_03 AC 129 ms
54,288 KB
testcase_04 AC 130 ms
53,852 KB
testcase_05 AC 131 ms
54,188 KB
testcase_06 AC 131 ms
54,184 KB
testcase_07 AC 132 ms
53,952 KB
testcase_08 AC 131 ms
54,032 KB
testcase_09 AC 231 ms
57,508 KB
testcase_10 AC 381 ms
64,128 KB
testcase_11 AC 432 ms
64,320 KB
testcase_12 AC 429 ms
64,220 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