結果
問題 | No.491 10^9+1と回文 |
ユーザー | momen999 |
提出日時 | 2017-06-16 08:16:22 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 303 ms / 1,000 ms |
コード長 | 277 bytes |
コンパイル時間 | 7,248 ms |
コンパイル使用メモリ | 171,520 KB |
実行使用メモリ | 8,192 KB |
最終ジャッジ日時 | 2024-10-01 08:47:01 |
合計ジャッジ時間 | 38,898 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 298 ms
7,936 KB |
testcase_01 | AC | 300 ms
8,064 KB |
testcase_02 | AC | 292 ms
7,936 KB |
testcase_03 | AC | 300 ms
7,936 KB |
testcase_04 | AC | 299 ms
7,936 KB |
testcase_05 | AC | 295 ms
8,064 KB |
testcase_06 | AC | 297 ms
7,936 KB |
testcase_07 | AC | 296 ms
7,936 KB |
testcase_08 | AC | 295 ms
7,936 KB |
testcase_09 | AC | 299 ms
7,936 KB |
testcase_10 | AC | 302 ms
8,064 KB |
testcase_11 | AC | 299 ms
7,936 KB |
testcase_12 | AC | 301 ms
7,936 KB |
testcase_13 | AC | 301 ms
8,064 KB |
testcase_14 | AC | 300 ms
8,064 KB |
testcase_15 | AC | 298 ms
8,192 KB |
testcase_16 | AC | 301 ms
7,936 KB |
testcase_17 | AC | 294 ms
8,192 KB |
testcase_18 | AC | 288 ms
8,192 KB |
testcase_19 | AC | 291 ms
8,064 KB |
testcase_20 | AC | 296 ms
8,064 KB |
testcase_21 | AC | 298 ms
8,192 KB |
testcase_22 | AC | 303 ms
7,936 KB |
testcase_23 | AC | 298 ms
8,064 KB |
testcase_24 | AC | 290 ms
7,936 KB |
testcase_25 | AC | 293 ms
8,064 KB |
testcase_26 | AC | 294 ms
8,192 KB |
testcase_27 | AC | 295 ms
8,064 KB |
testcase_28 | AC | 296 ms
7,936 KB |
testcase_29 | AC | 297 ms
7,936 KB |
testcase_30 | AC | 295 ms
7,936 KB |
testcase_31 | AC | 289 ms
8,192 KB |
testcase_32 | AC | 287 ms
7,936 KB |
testcase_33 | AC | 287 ms
7,936 KB |
testcase_34 | AC | 287 ms
7,936 KB |
testcase_35 | AC | 287 ms
8,192 KB |
testcase_36 | AC | 294 ms
7,936 KB |
testcase_37 | AC | 286 ms
7,936 KB |
testcase_38 | AC | 295 ms
7,936 KB |
testcase_39 | AC | 294 ms
8,192 KB |
testcase_40 | AC | 286 ms
8,064 KB |
testcase_41 | AC | 293 ms
8,064 KB |
testcase_42 | AC | 293 ms
7,936 KB |
testcase_43 | AC | 298 ms
8,192 KB |
testcase_44 | AC | 292 ms
8,192 KB |
testcase_45 | AC | 291 ms
8,064 KB |
testcase_46 | AC | 289 ms
8,064 KB |
testcase_47 | AC | 288 ms
8,064 KB |
testcase_48 | AC | 284 ms
8,064 KB |
testcase_49 | AC | 293 ms
8,064 KB |
testcase_50 | AC | 296 ms
8,064 KB |
testcase_51 | AC | 291 ms
8,192 KB |
testcase_52 | AC | 292 ms
8,192 KB |
testcase_53 | AC | 289 ms
8,064 KB |
testcase_54 | AC | 299 ms
8,064 KB |
testcase_55 | AC | 289 ms
7,936 KB |
testcase_56 | AC | 285 ms
8,064 KB |
testcase_57 | AC | 293 ms
7,936 KB |
testcase_58 | AC | 294 ms
8,192 KB |
testcase_59 | AC | 296 ms
7,936 KB |
testcase_60 | AC | 292 ms
7,936 KB |
testcase_61 | AC | 281 ms
7,936 KB |
testcase_62 | AC | 298 ms
8,192 KB |
testcase_63 | AC | 295 ms
7,936 KB |
testcase_64 | AC | 295 ms
7,936 KB |
testcase_65 | AC | 289 ms
8,064 KB |
testcase_66 | AC | 298 ms
7,936 KB |
testcase_67 | AC | 290 ms
7,936 KB |
testcase_68 | AC | 296 ms
8,064 KB |
testcase_69 | AC | 300 ms
8,064 KB |
testcase_70 | AC | 297 ms
8,064 KB |
testcase_71 | AC | 296 ms
8,192 KB |
testcase_72 | AC | 289 ms
7,936 KB |
testcase_73 | AC | 292 ms
8,192 KB |
testcase_74 | AC | 290 ms
7,936 KB |
testcase_75 | AC | 290 ms
8,192 KB |
testcase_76 | AC | 285 ms
8,064 KB |
testcase_77 | AC | 294 ms
8,192 KB |
testcase_78 | AC | 292 ms
8,064 KB |
testcase_79 | AC | 292 ms
7,936 KB |
testcase_80 | AC | 293 ms
8,192 KB |
testcase_81 | AC | 291 ms
7,936 KB |
testcase_82 | AC | 296 ms
7,936 KB |
testcase_83 | AC | 303 ms
7,936 KB |
testcase_84 | AC | 301 ms
8,064 KB |
testcase_85 | AC | 288 ms
7,936 KB |
testcase_86 | AC | 294 ms
8,064 KB |
testcase_87 | AC | 295 ms
8,064 KB |
testcase_88 | AC | 295 ms
7,936 KB |
testcase_89 | AC | 299 ms
8,064 KB |
testcase_90 | AC | 296 ms
8,064 KB |
testcase_91 | AC | 293 ms
7,936 KB |
testcase_92 | AC | 291 ms
7,936 KB |
testcase_93 | AC | 291 ms
7,936 KB |
testcase_94 | AC | 299 ms
7,936 KB |
testcase_95 | AC | 293 ms
7,936 KB |
testcase_96 | AC | 298 ms
8,064 KB |
testcase_97 | AC | 290 ms
8,064 KB |
testcase_98 | AC | 294 ms
7,936 KB |
testcase_99 | AC | 296 ms
8,192 KB |
testcase_100 | AC | 297 ms
8,064 KB |
testcase_101 | AC | 302 ms
7,936 KB |
testcase_102 | AC | 303 ms
7,936 KB |
testcase_103 | AC | 298 ms
8,192 KB |
testcase_104 | AC | 294 ms
8,064 KB |
testcase_105 | AC | 288 ms
7,936 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:5:74: warning: [GHC-63394] [-Wx-partial] In the use of ‘tail’ (imported from Prelude, but defined in GHC.List): "This is a partial function, it throws an error on empty lists. Replace it with drop 1, or use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty." | 5 | kaibun = concat $ map (\x -> map read [(show x) ++ rs x, (show x) ++ tail (rs x)]) [1..10^5] | ^^^^ [2 of 2] Linking a.out
ソースコード
rs = reverse . show solve :: (Integer, Integer) -> Int solve (x, n) = length $ filter (<= n) kaibun where kaibun = concat $ map (\x -> map read [(show x) ++ rs x, (show x) ++ tail (rs x)]) [1..10^5] main = readLn >>= print . solve. f where f x = (x, x `div` (10^9+1))