結果
問題 |
No.1644 Eight Digits
|
ユーザー |
![]() |
提出日時 | 2021-08-14 01:35:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 1,932 ms |
コンパイル使用メモリ | 194,724 KB |
最終ジャッジ日時 | 2025-01-23 21:31:22 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; using pint = pair<int, int>; using pll = pair<ll, ll>; int main(){ ll K; cin >> K; string S = "12345678"; int ans = 0; do { ll X = stoi(S); if(X % K == 0)ans++; }while(next_permutation(S.begin(), S.end())); cout << ans << endl; }