結果
問題 |
No.3028 No.9999
|
ユーザー |
![]() |
提出日時 | 2025-03-04 19:32:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 2,329 ms |
コンパイル使用メモリ | 192,040 KB |
実行使用メモリ | 11,552 KB |
最終ジャッジ日時 | 2025-03-04 19:32:39 |
合計ジャッジ時間 | 11,770 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int k = 1; int r = 10 % n; // 10^k ≡ 1 (mod n) になる最小の k を求める // 初期条件: k=1 のとき r = 10 mod n while(r != 1){ r = (r * 10) % n; k++; } cout << k << endl; return 0; }