結果

問題 No.1644 Eight Digits
ユーザー hatsuka_iwa
提出日時 2021-08-21 20:18:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 230 bytes
コンパイル時間 1,614 ms
コンパイル使用メモリ 167,728 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 11:00:14
合計ジャッジ時間 2,811 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  int K, ans = 0;
  cin >> K;
  string S = "12345678";

  do {
    ans += stoi(S) % K ? 0 : 1; 
  } while (next_permutation(S.begin(), S.end()));
  cout << ans << endl;
}
0