結果
問題 |
No.1644 Eight Digits
|
ユーザー |
![]() |
提出日時 | 2023-06-08 00:15:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 1,000 ms |
コード長 | 489 bytes |
コンパイル時間 | 1,099 ms |
コンパイル使用メモリ | 106,112 KB |
最終ジャッジ日時 | 2025-02-13 23:20:41 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#include <iostream> #include <vector> #include <cmath> #include <map> #include <set> #include <iomanip> #include <queue> #include <algorithm> #include <numeric> #include <deque> #include <complex> #include <cassert> using namespace std; using ll = long long; int main(){ string S="12345678"; ll N, K, ans=0; cin >> K; do{ N = stoll(S); if (N % K == 0) ans++; } while(next_permutation(S.begin(), S.end())); cout << ans << endl; return 0; }