結果
問題 |
No.1644 Eight Digits
|
ユーザー |
|
提出日時 | 2021-08-13 21:27:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 1,912 ms |
コンパイル使用メモリ | 195,104 KB |
最終ジャッジ日時 | 2025-01-23 18:13:12 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ string T = "12345678"; int K; cin >> K; int ans = 0; do{ int t = stoi(T); if(t % K == 0) ans++; }while(next_permutation(T.begin(), T.end())); cout << ans << endl; }