結果
問題 | No.175 simpleDNA |
ユーザー | javy |
提出日時 | 2015-11-11 23:20:21 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 257 ms / 1,000 ms |
コード長 | 902 bytes |
コンパイル時間 | 12,032 ms |
コンパイル使用メモリ | 428,096 KB |
実行使用メモリ | 54,344 KB |
最終ジャッジ日時 | 2024-04-30 06:27:21 |
合計ジャッジ時間 | 12,141 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 254 ms
54,344 KB |
testcase_01 | AC | 247 ms
54,248 KB |
testcase_02 | AC | 244 ms
54,108 KB |
testcase_03 | AC | 248 ms
54,232 KB |
testcase_04 | AC | 257 ms
54,296 KB |
testcase_05 | AC | 251 ms
54,068 KB |
testcase_06 | AC | 257 ms
54,240 KB |
testcase_07 | AC | 255 ms
54,140 KB |
testcase_08 | AC | 252 ms
54,232 KB |
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
package Yukicoder /** * Created by hichikawa on 2015/11/11. */ fun main(args: Array<String>) { fun readLineStringArray() : List<String> { val str = readLine() as String val arrStr = str.split(" ") return arrStr } fun readLineLong() : Long { val str = readLine() as String return str.toLong() } // fun calcCountDNA(num : Int, c1 : Char, c2 : Char, c3 : Char) : Int { // var count = 1 // if (num == 0) { // return count // } // if (c1 != 'A' && c2 != 'A' && c3 != 'A') { // count += calcCountDNA(num - 1, 'A', c1, c2) // } // if (c1 != 'B' && c2 != 'B' && c3 != 'B') { // count += calcCountDNA(num - 1, 'B', c1, c2) // } // return count // } val len = readLineLong() val num = readLineLong() println(Math.pow(2.0,len-3.0).toInt()*num) }