結果
問題 | No.491 10^9+1と回文 |
ユーザー |
![]() |
提出日時 | 2022-04-20 04:08:58 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 265 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 8,064 KB |
実行使用メモリ | 13,056 KB |
最終ジャッジ日時 | 2025-01-03 04:23:27 |
合計ジャッジ時間 | 76,061 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 100 WA * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_iL = 10 ** 9 + 1ans = (1..9).count { |x| L * x < N }1.upto(40000) do |i|x = (i.to_s + i.to_s.reverse).to_ians += 1 if L * x < N0.upto(9) do |j|y = (i.to_s + j.to_s + i.to_s.reverse).to_ians += 1 if L * y < Nendendputs ans