結果

問題 No.83 最大マッチング
ユーザー villachvillach
提出日時 2017-09-19 15:41:18
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 472 bytes
コンパイル時間 3,528 ms
コンパイル使用メモリ 74,524 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-04-25 18:10:15
合計ジャッジ時間 5,572 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
54,256 KB
testcase_01 AC 126 ms
54,316 KB
testcase_02 AC 124 ms
53,908 KB
testcase_03 AC 121 ms
54,368 KB
testcase_04 AC 116 ms
54,268 KB
testcase_05 AC 124 ms
53,992 KB
testcase_06 AC 127 ms
54,060 KB
testcase_07 AC 129 ms
54,196 KB
testcase_08 AC 127 ms
54,048 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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();
		int m = 0;
		int c1 = 0;
		int c2 = 0;
		if(n % 2 == 0){
			c1 = n / 2;
			for(int i = 0;i < c1;++i){
				m += Math.pow(10, i);
			}
		}else{
			c1 = n / 2 - 1;
			c2 = 1;
			m += 7 * Math.pow(10, c1);
			for(int i = 0;i < c1;++i){
				m += Math.pow(10, i);
			}
		}
		
		System.out.println(m);
	}
}
0