結果
問題 |
No.1849 Three Times Value
|
ユーザー |
|
提出日時 | 2022-02-18 19:28:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 490 bytes |
コンパイル時間 | 1,507 ms |
コンパイル使用メモリ | 169,032 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 13:54:39 |
合計ジャッジ時間 | 2,429 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 6 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; i++) #define srep(i,a,b) for(int i = a; i < b; i++) #define all(A) (A).begin(),(A).end() #define MOD 1000000007 using namespace std; using ll = long long; struct Edge { ll to,cost; }; using Graph = vector<vector<int>>; using P = pair<int,int>; const ll INF = 1LL<<60; int main() { ll n; cin >> n; int ans = 0; rep(i,10000){ string t = to_string(i+1); string s = t+t+t; if(n >= stoll(s)) ans++; } cout << ans; }