結果

問題 No.3264 岩井数
ユーザー おもち(求肥)
提出日時 2025-09-06 15:18:43
言語 Rust
(1.83.0 + proconio)
結果
TLE  
実行時間 -
コード長 387 bytes
コンパイル時間 14,245 ms
コンパイル使用メモリ 400,092 KB
実行使用メモリ 9,764 KB
最終ジャッジ日時 2025-09-06 15:19:05
合計ジャッジ時間 18,607 ms
ジャッジサーバーID
(参考情報)
judge3 / judge
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other AC * 7 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
fn main() {
  input!{
    n: usize
  }

  let mut multiplier = 1;
  loop {
    let current = n*multiplier;
    if current<1_000_000_000{multiplier += 10; continue;}
    let current_str = (current/10).to_string();
    if current_str == current_str.chars().rev().collect::<String>(){
        println!("{}", current);
        return;
    }

    multiplier += 10;
  }
}
0