結果

問題 No.175 simpleDNA
ユーザー akko_yukkyakko_yukky
提出日時 2017-05-30 16:19:32
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 283 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 30,464 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 18:02:57
合計ジャッジ時間 992 ms
ジャッジサーバーID
(参考情報)
judge9 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 0 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 0 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d",&l);
      |         ~~~~~^~~~~~~~~
main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%d",&n);
      |         ~~~~~^~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <math.h>

int main(void) {

        int l;
        int n;
        int res;

        scanf("%d",&l);
        scanf("%d",&n);

        //res = (l-3)**n * n;
        res = pow(2,l-3)*n;

        printf("%d\n", res);
        //printf(\n);
        return 0;
}
0