結果
問題 |
No.3264 岩井数
|
ユーザー |
|
提出日時 | 2025-09-06 14:24:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 820 bytes |
コンパイル時間 | 2,058 ms |
コンパイル使用メモリ | 199,556 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-06 14:24:28 |
合計ジャッジ時間 | 6,294 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 7 TLE * 1 -- * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (ll)(n); i++) #define oke cout << "Yes" << '\n'; #define dame cout << "No" << '\n'; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() using HaiI = vector<vector<int>>; using Hai2 = vector<vector<ll>>; using HaiB = vector<vector<bool>>; using Hai3 = vector<vector<vector<ll>>>; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); ll N; cin>>N; for(ll i=0;i<1e100;i++){ string S; if(i!=0){ S=to_string(i); }else{ S=""; } string T=S; reverse(all(T)); rep(j,10){ string K=S+to_string(j)+T+"9"; if(i==0 && j==0){ continue; } ll A=stoll(K); if(A>=1e9 && A%N==0){ cout<<A<<"\n"; return 0; } } } }