提出 #18734045


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll L; cin >> L;
  vector<ll> A(11, 0);
  vector<ll> d(12, 0);
  for (ll i = 0; i < 11; i++) {
    A[i] = L - 1 - i;
  }

  d[2] = 8; d[3] = 4; d[5] = 2; d[7] = 1; d[11] = 1;
  for (ll i = 0; i < 11; i++) {
    for (ll j = 2; j < 12; j++) {
      while (d[j] > 0 && A[i] % j == 0) {
        A[i] /= j;
        d[j]--;
      }
    }
  }
  ll ans = 1;
  for (ll i = 0; i < 11; i++) {
    ans *= A[i];
  }
  cout << ans << '\n';
  return 0;
}

提出情報

提出日時
問題 C - Duodecim Ferra
ユーザ nakaken88
言語 C++ (GCC 9.2.1)
得点 300
コード長 598 Byte
結果 AC
実行時間 7 ms
メモリ 3648 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 16
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All handmade_00.txt, handmade_01.txt, handmade_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
handmade_00.txt AC 7 ms 3560 KiB
handmade_01.txt AC 2 ms 3608 KiB
handmade_02.txt AC 2 ms 3608 KiB
random_00.txt AC 2 ms 3636 KiB
random_01.txt AC 3 ms 3616 KiB
random_02.txt AC 3 ms 3640 KiB
random_03.txt AC 2 ms 3452 KiB
random_04.txt AC 2 ms 3580 KiB
random_05.txt AC 2 ms 3500 KiB
random_06.txt AC 2 ms 3596 KiB
random_07.txt AC 2 ms 3452 KiB
random_08.txt AC 2 ms 3560 KiB
random_09.txt AC 2 ms 3648 KiB
sample_01.txt AC 2 ms 3608 KiB
sample_02.txt AC 3 ms 3636 KiB
sample_03.txt AC 2 ms 3596 KiB