結果
| 問題 | No.1849 Three Times Value |
| ユーザー |
mmn15277198
|
| 提出日時 | 2022-03-06 01:08:59 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 534 bytes |
| 記録 | |
| コンパイル時間 | 814 ms |
| コンパイル使用メモリ | 118,764 KB |
| 実行使用メモリ | 126,732 KB |
| 最終ジャッジ日時 | 2026-04-02 22:23:41 |
| 合計ジャッジ時間 | 2,927 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <set>
#include <cstdio>
#include <string>
using namespace std;
int main() {
long long n;
cin >> n;
map<long long, int> mp;
for (long long i = 1; i < 1000000; i++) {
if (i >= n) break;
string s = to_string(i) + to_string(i) + to_string(i);
long long now = stoll(s);
if (now <= n) {
mp[now]++;
}
}
cout << mp.size() << endl;
return 0;
}
mmn15277198