結果

問題 No.175 simpleDNA
ユーザー ThhG_9l3ThhG_9l3
提出日時 2018-05-05 15:26:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 454 bytes
コンパイル時間 3,180 ms
コンパイル使用メモリ 72,000 KB
実行使用メモリ 56,200 KB
最終ジャッジ日時 2023-09-10 10:33:03
合計ジャッジ時間 5,070 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,932 KB
testcase_01 AC 122 ms
56,044 KB
testcase_02 AC 123 ms
56,200 KB
testcase_03 AC 122 ms
55,956 KB
testcase_04 AC 122 ms
55,932 KB
testcase_05 AC 123 ms
55,968 KB
testcase_06 AC 123 ms
55,996 KB
testcase_07 AC 123 ms
55,652 KB
testcase_08 AC 122 ms
56,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukikoda;
import java.util.Scanner;
public class gobe {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int L = sc.nextInt();
		int N = sc.nextInt();
		int sum = 1;
		String[] str = new String[N];
		
		for(int i=0; i<N; i++) {
			str[i] = sc.next();
		}
		
		if(L == 3) {
			System.out.println(N);
		}
		
		if(L > 3) {
			for(int i=1; i<=L-3; i++) {
				sum *= 2;
			}
			System.out.println(sum*N);
		}
	}
}
0