結果
| 問題 |
No.1644 Eight Digits
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-05 07:13:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 1,000 ms |
| コード長 | 285 bytes |
| コンパイル時間 | 2,192 ms |
| コンパイル使用メモリ | 189,368 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-21 17:49:50 |
| 合計ジャッジ時間 | 3,041 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, ans = 0; cin >> K;
string S = "12345678";
for(int i = 0; i < 40320; i++){
int s = stoi(S);
if(s%K == 0) ans++;
next_permutation(S.begin(), S.end());
}
cout << ans << endl;
}