結果

問題 No.83 最大マッチング
ユーザー リチウムリチウム
提出日時 2014-12-02 23:40:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 443 ms / 5,000 ms
コード長 675 bytes
コンパイル時間 3,297 ms
コンパイル使用メモリ 72,168 KB
実行使用メモリ 66,740 KB
最終ジャッジ日時 2023-09-02 01:10:10
合計ジャッジ時間 6,662 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,856 KB
testcase_01 AC 122 ms
56,184 KB
testcase_02 AC 123 ms
56,064 KB
testcase_03 AC 122 ms
55,680 KB
testcase_04 AC 122 ms
55,616 KB
testcase_05 AC 120 ms
56,052 KB
testcase_06 AC 124 ms
55,980 KB
testcase_07 AC 123 ms
56,572 KB
testcase_08 AC 122 ms
55,728 KB
testcase_09 AC 228 ms
59,236 KB
testcase_10 AC 361 ms
65,236 KB
testcase_11 AC 440 ms
66,740 KB
testcase_12 AC 443 ms
66,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import static java.lang.Math.*;
 
public class ppp {
	
	
		
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  int n=sc.nextInt();
	  int a[]={6,2,5,5,4,5,6,3,7,6};
	  if(n==2)System.out.println(1);
	  else if(n==3)System.out.println(7);
	  else if(n==4)System.out.println(11);
	  else{
		  int x=n/2;
		  if(n%2==0){
			  for(int i=0;i<n/2;i++){
				  System.out.print(1);
			  }
			  System.out.println();
		  }
		  else{
			  for(int i=0;i<n/2;i++){
				  if(i==0)System.out.print(7);
				  else System.out.print(1);
			  }
			  System.out.println();
		  }
		  
		  
		  
	  }
	  
  }}
0