結果

問題 No.175 simpleDNA
ユーザー nCk_cv
提出日時 2015-04-20 17:52:10
言語 Java
(openjdk 23)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 1,909 ms
コンパイル使用メモリ 73,836 KB
実行使用メモリ 41,204 KB
最終ジャッジ日時 2024-07-04 18:27:25
合計ジャッジ時間 3,647 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 
 
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int l = sc.nextInt();
    	int n = sc.nextInt();
    	
    	for(int i = 0; i < n; i++) {
    		sc.next();
    	}
    	
    	l -= 3;
    	
    	long sum = (long)Math.pow(2, l);
    	
    	sum *= n;
    	System.out.println(sum);
    }
}
    	
0