結果

問題 No.83 最大マッチング
ユーザー willowoooo
提出日時 2016-06-05 03:29:56
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 2,542 ms
コンパイル使用メモリ 74,308 KB
実行使用メモリ 54,308 KB
最終ジャッジ日時 2024-10-08 14:02:03
合計ジャッジ時間 5,143 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

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