結果

問題 No.1644 Eight Digits
ユーザー 👑 CleyL
提出日時 2022-05-07 11:05:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 1,000 ms
コード長 236 bytes
コンパイル時間 837 ms
コンパイル使用メモリ 71,932 KB
最終ジャッジ日時 2025-01-29 04:39:40
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  string s = "12345678";
  int k;cin>>k;
  int ans = 0;
  do{
    if(stoi(s)%k == 0)ans++;
  }while(next_permutation(s.begin(),s.end()));
  cout << ans << endl;
}
0