結果

問題 No.3028 No.9999
ユーザー おんぷの塊
提出日時 2025-03-31 17:18:05
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 303 bytes
コンパイル時間 3,923 ms
コンパイル使用メモリ 273,220 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-31 17:18:15
合計ジャッジ時間 10,312 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 TLE * 1 -- * 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;
	long long k = 0;
	while(true) {
		k++;
		tmp += 9 * i;
		if (tmp % n == 0) {
			cout << k << endl;
			return 0;
		}		
		i *= 10;
	}
}
0