結果

問題 No.1644 Eight Digits
ユーザー yukster714
提出日時 2023-04-22 13:48:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 297 bytes
コンパイル時間 1,859 ms
コンパイル使用メモリ 167,132 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 02:40:32
合計ジャッジ時間 2,860 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end() 
using namespace std;
int main() {
    int k; cin >> k;
    int ans = 0;
    string digits = "12345678";
    do{
        if(stoi(digits) % k == 0) ans++;
    }while(next_permutation(all(digits)));
    cout << ans << endl;
    return 0;
}

0