結果

問題 No.3028 No.9999
ユーザー おんぷの塊
提出日時 2025-03-31 17:08:37
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 3,605 ms
コンパイル使用メモリ 274,392 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-31 17:08:45
合計ジャッジ時間 5,389 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
	
	long long n; cin >> n;
	long long tmp = 0, i = 1;

	for (int k = 1; k < 10; k++) {
		tmp += 9 * i;
		if (tmp % n == 0) {
			cout << k << endl;
			return 0;
		}		i *= 10;
	}
}
0