結果
問題 | No.491 10^9+1と回文 |
ユーザー | 14番 |
提出日時 | 2017-03-10 23:18:38 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 2,093 bytes |
コンパイル時間 | 1,085 ms |
コンパイル使用メモリ | 112,248 KB |
実行使用メモリ | 60,940 KB |
最終ジャッジ日時 | 2024-06-24 08:41:11 |
合計ジャッジ時間 | 9,911 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 69 ms
29,076 KB |
testcase_04 | AC | 38 ms
26,576 KB |
testcase_05 | AC | 62 ms
29,072 KB |
testcase_06 | AC | 367 ms
57,676 KB |
testcase_07 | AC | 33 ms
24,548 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 32 ms
26,568 KB |
testcase_12 | AC | 31 ms
24,484 KB |
testcase_13 | WA | - |
testcase_14 | AC | 37 ms
24,596 KB |
testcase_15 | AC | 32 ms
26,412 KB |
testcase_16 | AC | 32 ms
24,532 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 32 ms
24,656 KB |
testcase_20 | WA | - |
testcase_21 | AC | 31 ms
26,660 KB |
testcase_22 | WA | - |
testcase_23 | AC | 35 ms
26,512 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 34 ms
22,496 KB |
testcase_31 | WA | - |
testcase_32 | AC | 33 ms
22,556 KB |
testcase_33 | WA | - |
testcase_34 | AC | 31 ms
24,596 KB |
testcase_35 | AC | 33 ms
24,532 KB |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | AC | 32 ms
24,368 KB |
testcase_39 | AC | 32 ms
24,524 KB |
testcase_40 | WA | - |
testcase_41 | AC | 31 ms
24,656 KB |
testcase_42 | AC | 31 ms
24,624 KB |
testcase_43 | AC | 30 ms
22,196 KB |
testcase_44 | AC | 32 ms
26,456 KB |
testcase_45 | AC | 30 ms
24,280 KB |
testcase_46 | AC | 31 ms
24,436 KB |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | AC | 32 ms
26,368 KB |
testcase_51 | AC | 34 ms
26,328 KB |
testcase_52 | AC | 31 ms
26,472 KB |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | AC | 31 ms
24,432 KB |
testcase_58 | AC | 35 ms
24,740 KB |
testcase_59 | AC | 32 ms
24,368 KB |
testcase_60 | AC | 32 ms
26,312 KB |
testcase_61 | WA | - |
testcase_62 | AC | 33 ms
26,308 KB |
testcase_63 | AC | 35 ms
24,428 KB |
testcase_64 | AC | 31 ms
22,580 KB |
testcase_65 | WA | - |
testcase_66 | WA | - |
testcase_67 | AC | 111 ms
35,352 KB |
testcase_68 | AC | 32 ms
24,552 KB |
testcase_69 | WA | - |
testcase_70 | WA | - |
testcase_71 | AC | 34 ms
26,524 KB |
testcase_72 | AC | 32 ms
24,392 KB |
testcase_73 | AC | 32 ms
24,492 KB |
testcase_74 | AC | 31 ms
24,344 KB |
testcase_75 | WA | - |
testcase_76 | WA | - |
testcase_77 | WA | - |
testcase_78 | AC | 32 ms
24,728 KB |
testcase_79 | AC | 34 ms
26,524 KB |
testcase_80 | WA | - |
testcase_81 | WA | - |
testcase_82 | WA | - |
testcase_83 | AC | 32 ms
24,656 KB |
testcase_84 | WA | - |
testcase_85 | AC | 32 ms
26,224 KB |
testcase_86 | WA | - |
testcase_87 | AC | 32 ms
26,472 KB |
testcase_88 | WA | - |
testcase_89 | AC | 31 ms
24,268 KB |
testcase_90 | AC | 31 ms
24,264 KB |
testcase_91 | AC | 33 ms
22,444 KB |
testcase_92 | WA | - |
testcase_93 | AC | 32 ms
24,600 KB |
testcase_94 | AC | 33 ms
24,404 KB |
testcase_95 | WA | - |
testcase_96 | AC | 30 ms
26,612 KB |
testcase_97 | AC | 115 ms
37,768 KB |
testcase_98 | AC | 403 ms
59,972 KB |
testcase_99 | AC | 306 ms
52,800 KB |
testcase_100 | AC | 308 ms
54,636 KB |
testcase_101 | AC | 255 ms
53,352 KB |
testcase_102 | AC | 267 ms
53,200 KB |
testcase_103 | AC | 366 ms
58,796 KB |
testcase_104 | AC | 363 ms
60,532 KB |
testcase_105 | AC | 365 ms
60,940 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; using System.Text.RegularExpressions; using System.Text; public class Program { public void Proc() { Reader.IsDebug = false; decimal inpt = decimal.Parse(Reader.ReadLine()); this.max = inpt; long ans = 0; for(int i=0; i<=9; i++) { ans += GetNum(i.ToString()); ans += GetNum(i.ToString()+i); } Console.WriteLine(ans); } private Dictionary<string, bool> flag = new Dictionary<string, bool>(); private Dictionary<decimal, bool> flagNum = new Dictionary<decimal, bool>(); private long GetNum(string tmp) { if(flag.ContainsKey(tmp)) { return 0; } flag[tmp] = true; decimal num = decimal.Parse(tmp); if(num*baseNum > max) { return -1; } if(tmp.Length >= 10) { return -1; } long ans = 0; if(!flagNum.ContainsKey(num)) { if(num > 0 && num.ToString().Length == tmp.Length) { ans++; } flagNum[num] = true; } for(int i=0; i<=9; i++) { long ret = GetNum(i + tmp + i); if(ret >= 0) { ans+=ret; } else { break; } } return ans; } private decimal max = 0; private decimal baseNum = 1000000000 + 1; public class Reader { public static bool IsDebug = true; private static System.IO.StringReader SReader; private static string InitText = @" 40000000000 "; public static string ReadLine() { if(IsDebug) { if(SReader == null) { SReader = new System.IO.StringReader(InitText.Trim()); } return SReader.ReadLine(); } else { return Console.ReadLine(); } } } public static void Main(string[] args) { Program prg = new Program(); prg.Proc(); } }