結果

問題 No.111 あばばばば
ユーザー fukuseifukusei
提出日時 2017-05-17 15:24:36
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 5,664 ms
コンパイル使用メモリ 77,516 KB
実行使用メモリ 57,672 KB
最終ジャッジ日時 2023-10-17 23:53:16
合計ジャッジ時間 7,788 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*; 

public class test {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		/*
		 *3 1aba        1(aba)
		 *5 2 4ababa      2(aba)1(bab)1(ababa)
		 *7 3 9abababa    3(aba)2(bab)2(ababa)1(babab)1(abababa)
		 *9 4 16ababababa 4(aba)3(bab)3(ababa)2(babab)2(abababa)1(bababab)1(abababab)
		 */
		
		long b = (a-1) / 2;
		long ans = b * b;
		
		System.out.println(b);
		System.out.println(ans);
	}
}
0