結果
| 問題 |
No.1849 Three Times Value
|
| ユーザー |
|
| 提出日時 | 2024-03-20 16:44:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 328 bytes |
| コンパイル時間 | 4,428 ms |
| コンパイル使用メモリ | 251,616 KB |
| 最終ジャッジ日時 | 2025-02-20 08:11:28 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
ll N, ans;
string S;
int main() {
cin >> N;
for (int i = 1; i <= 99999; i++) {
S = to_string(i);
S = S + S + S;
if (stoll(S) <= N) ans++;
else break;
}
cout << ans << endl;
return 0;
}