結果
| 問題 |
No.1849 Three Times Value
|
| ユーザー |
👑 |
| 提出日時 | 2022-07-09 00:10:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 2,000 ms |
| コード長 | 300 bytes |
| コンパイル時間 | 1,249 ms |
| コンパイル使用メモリ | 70,372 KB |
| 最終ジャッジ日時 | 2025-01-30 05:42:51 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <iostream>
using namespace std;
int main(){
long long n;cin>>n;
int nw = 1;
int ans = 0;
while(true){
string x = to_string(nw) + to_string(nw) + to_string(nw);
if(stoll(x) <= n)ans++;
else break;
nw++;
}
cout << ans << endl;
}