結果
問題 | No.491 10^9+1と回文 |
ユーザー |
|
提出日時 | 2019-10-12 17:34:29 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 249 ms / 1,000 ms |
コード長 | 158 bytes |
コンパイル時間 | 352 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-11-28 14:50:57 |
合計ジャッジ時間 | 28,796 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 103 |
コンパイルメッセージ
Syntax OK
ソースコード
N=gets.to_i/(10**9+1)ans=01.upto(10**5-1){|i|t=(i.to_s+i.to_s.reverse).to_ians+=1 if t<=Nt=(i.to_s[0..-2]+i.to_s.reverse).to_ians+=1 if t<=N}p ans