結果
問題 |
No.1849 Three Times Value
|
ユーザー |
![]() |
提出日時 | 2022-03-06 01:08:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 522 bytes |
コンパイル時間 | 1,247 ms |
コンパイル使用メモリ | 103,364 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-20 08:37:06 |
合計ジャッジ時間 | 4,481 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 11 |
ソースコード
#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() { int n; cin >> n; map<long long, int> mp; for (int 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; }