結果
| 問題 |
No.3264 岩井数
|
| コンテスト | |
| ユーザー |
ゼリトキ
|
| 提出日時 | 2025-09-06 14:19:21 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 667 bytes |
| コンパイル時間 | 3,303 ms |
| コンパイル使用メモリ | 278,496 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-06 14:19:33 |
| 合計ジャッジ時間 | 12,345 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 WA * 9 |
ソースコード
#include <bits/stdc++.h>
#include "atcoder/lazysegtree"
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define ll long long
const long long mod=998244353;
const long long hmod=46216567629137;
bool check(string S){
int siz=S.size();
for(int i=0;i<siz;i++){
if(S[i]!=S[siz-i-1]) return 0;
}
return 1;
}
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
ll N;
cin>>N;
ll KK=(N-9)/10;
for(ll i=1;i<=10000000;i++){
ll K=KK;
K+=i*(10*KK+9);
if(K<100000000) continue;
if(check(to_string(K))){
cout<<K<<9<<endl;
return 0;
}
}
}
ゼリトキ