結果

問題 No.3028 No.9999
ユーザー sai
提出日時 2025-02-22 05:13:31
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 289 bytes
コンパイル時間 3,425 ms
コンパイル使用メモリ 273,720 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-02-22 05:13:41
合計ジャッジ時間 9,126 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int N; std::cin >> N;
  long long r = 1;
  for (int k = 1; k <= N; k++) {
    r = r * 10 % N;
    if (r == 1) {
      std::cout << k << '\n';
      return 0;
    }
  }
  assert(false);
}
0