結果

問題 No.83 最大マッチング
ユーザー willowoooowillowoooo
提出日時 2016-06-05 03:29:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 2,015 ms
コンパイル使用メモリ 74,376 KB
実行使用メモリ 54,380 KB
最終ジャッジ日時 2024-04-17 03:53:15
合計ジャッジ時間 4,472 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
40,972 KB
testcase_01 AC 133 ms
41,204 KB
testcase_02 AC 129 ms
41,020 KB
testcase_03 AC 126 ms
41,216 KB
testcase_04 AC 127 ms
41,308 KB
testcase_05 AC 128 ms
41,260 KB
testcase_06 AC 130 ms
41,196 KB
testcase_07 AC 130 ms
41,256 KB
testcase_08 AC 132 ms
41,244 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans;
		if(n % 2 == 1){
			ans = 7;
			n--;
		}
		else{
			ans = 1;
		}
		n = n-2;
		while(n > 0){
			ans = ans*10+1;
			n = n-2;
		}
		System.out.println(ans);
	}
}
0