結果

問題 No.175 simpleDNA
ユーザー marumaru
提出日時 2016-03-23 16:00:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 396 bytes
コンパイル時間 2,889 ms
コンパイル使用メモリ 75,328 KB
実行使用メモリ 56,016 KB
最終ジャッジ日時 2024-04-09 21:04:32
合計ジャッジ時間 4,500 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
54,156 KB
testcase_01 AC 106 ms
53,624 KB
testcase_02 AC 108 ms
53,132 KB
testcase_03 AC 115 ms
56,016 KB
testcase_04 AC 105 ms
54,088 KB
testcase_05 AC 104 ms
53,164 KB
testcase_06 AC 101 ms
53,032 KB
testcase_07 AC 103 ms
53,236 KB
testcase_08 AC 109 ms
54,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class yukicoder_175 {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int l = stdIn.nextInt();
		int n = stdIn.nextInt();
		
		String[] dna = new String[n];
		
		int tori = 0;
		
		for (int i = 0; i < n; i++) {
			dna[i] = stdIn.next();
			tori += Math.pow(2, l - dna[i].length());
		}
		
		System.out.println(tori);
	}
}
0