結果

問題 No.3264 岩井数
ユーザー The_Bouningeeeen
提出日時 2025-09-09 22:53:27
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 11,235 ms
コンパイル使用メモリ 401,028 KB
実行使用メモリ 15,940 KB
最終ジャッジ日時 2025-09-09 22:53:45
合計ジャッジ時間 16,132 ms
ジャッジサーバーID
(参考情報)
judge / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other WA * 7 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
        n: usize,
    }

    let mut start = 1e9 as usize / n + 1;
    while start % 10 != 1 {
        start += 1;
    }

    for i in (start..).step_by(10) {
        let num = n * i;
        if num < 1e9 as usize {
            continue;
        }

        let mut s = num.to_string();
        s.pop();
        if s.chars().eq(s.chars().rev()) {
            println!("{} * {} = {}", n, i, num);
            break;
        }
    }
}
0