結果

問題 No.175 simpleDNA
ユーザー Yug_min_null
提出日時 2021-11-13 22:16:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 325 bytes
コンパイル時間 2,177 ms
コンパイル使用メモリ 185,740 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-28 00:50:10
合計ジャッジ時間 2,726 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  ll L, N; cin >> L >> N;
  ll ans;
  if(L == 3) ans = N;
  else{
    ans = 1;
    int i = 3;
    while(i < L){
      ans *= 2;
      i++;
    }
    ans *= N;
  }
  cout << ans << endl;
}
0