結果
問題 | No.428 小数から逃げる夢 |
ユーザー | nobigomu |
提出日時 | 2018-06-07 12:45:29 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 177 ms / 1,000 ms |
コード長 | 1,278 bytes |
コンパイル時間 | 9,710 ms |
コンパイル使用メモリ | 188,152 KB |
実行使用メモリ | 37,468 KB |
最終ジャッジ日時 | 2024-06-30 10:27:47 |
合計ジャッジ時間 | 26,526 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 164 ms
33,920 KB |
testcase_01 | AC | 165 ms
34,304 KB |
testcase_02 | AC | 165 ms
34,024 KB |
testcase_03 | AC | 165 ms
33,920 KB |
testcase_04 | AC | 166 ms
34,176 KB |
testcase_05 | AC | 166 ms
34,176 KB |
testcase_06 | AC | 167 ms
34,048 KB |
testcase_07 | AC | 167 ms
34,176 KB |
testcase_08 | AC | 166 ms
33,920 KB |
testcase_09 | AC | 173 ms
35,200 KB |
testcase_10 | AC | 172 ms
35,328 KB |
testcase_11 | AC | 171 ms
35,312 KB |
testcase_12 | AC | 170 ms
35,320 KB |
testcase_13 | AC | 174 ms
35,184 KB |
testcase_14 | AC | 172 ms
35,328 KB |
testcase_15 | AC | 177 ms
35,456 KB |
testcase_16 | AC | 171 ms
35,328 KB |
testcase_17 | AC | 171 ms
35,200 KB |
testcase_18 | AC | 171 ms
35,456 KB |
testcase_19 | AC | 170 ms
35,452 KB |
testcase_20 | AC | 169 ms
35,452 KB |
testcase_21 | AC | 169 ms
35,200 KB |
testcase_22 | AC | 172 ms
35,176 KB |
testcase_23 | AC | 174 ms
35,432 KB |
testcase_24 | AC | 171 ms
35,328 KB |
testcase_25 | AC | 172 ms
35,180 KB |
testcase_26 | AC | 170 ms
35,200 KB |
testcase_27 | AC | 170 ms
35,456 KB |
testcase_28 | AC | 169 ms
35,328 KB |
testcase_29 | AC | 170 ms
35,072 KB |
testcase_30 | AC | 173 ms
35,328 KB |
testcase_31 | AC | 171 ms
35,200 KB |
testcase_32 | AC | 169 ms
35,072 KB |
testcase_33 | AC | 170 ms
35,072 KB |
testcase_34 | AC | 169 ms
35,456 KB |
testcase_35 | AC | 169 ms
35,456 KB |
testcase_36 | AC | 169 ms
35,328 KB |
testcase_37 | AC | 170 ms
35,200 KB |
testcase_38 | AC | 170 ms
35,456 KB |
testcase_39 | AC | 170 ms
35,072 KB |
testcase_40 | AC | 169 ms
35,312 KB |
testcase_41 | AC | 171 ms
37,468 KB |
testcase_42 | AC | 171 ms
35,328 KB |
testcase_43 | AC | 171 ms
35,584 KB |
testcase_44 | AC | 170 ms
37,340 KB |
testcase_45 | AC | 170 ms
35,456 KB |
testcase_46 | AC | 171 ms
35,436 KB |
testcase_47 | AC | 170 ms
35,328 KB |
testcase_48 | AC | 170 ms
35,308 KB |
testcase_49 | AC | 171 ms
35,200 KB |
testcase_50 | AC | 167 ms
35,072 KB |
testcase_51 | AC | 172 ms
35,200 KB |
testcase_52 | AC | 173 ms
35,328 KB |
testcase_53 | AC | 171 ms
35,200 KB |
testcase_54 | AC | 170 ms
35,424 KB |
testcase_55 | AC | 170 ms
35,440 KB |
testcase_56 | AC | 169 ms
35,072 KB |
testcase_57 | AC | 171 ms
35,200 KB |
testcase_58 | AC | 171 ms
35,456 KB |
testcase_59 | AC | 171 ms
35,200 KB |
testcase_60 | AC | 171 ms
35,200 KB |
testcase_61 | AC | 172 ms
35,200 KB |
testcase_62 | AC | 171 ms
35,324 KB |
testcase_63 | AC | 172 ms
35,200 KB |
testcase_64 | AC | 171 ms
35,320 KB |
testcase_65 | AC | 172 ms
35,072 KB |
testcase_66 | AC | 169 ms
35,200 KB |
testcase_67 | AC | 171 ms
35,200 KB |
testcase_68 | AC | 171 ms
35,328 KB |
testcase_69 | AC | 171 ms
35,072 KB |
testcase_70 | AC | 172 ms
35,432 KB |
testcase_71 | AC | 169 ms
35,200 KB |
testcase_72 | AC | 169 ms
35,452 KB |
testcase_73 | AC | 169 ms
35,200 KB |
testcase_74 | AC | 170 ms
35,456 KB |
testcase_75 | AC | 170 ms
35,200 KB |
testcase_76 | AC | 173 ms
35,584 KB |
testcase_77 | AC | 171 ms
35,200 KB |
testcase_78 | AC | 172 ms
35,072 KB |
testcase_79 | AC | 170 ms
35,712 KB |
testcase_80 | AC | 175 ms
35,200 KB |
testcase_81 | AC | 172 ms
35,200 KB |
testcase_82 | AC | 170 ms
35,200 KB |
testcase_83 | AC | 171 ms
35,432 KB |
testcase_84 | AC | 171 ms
35,072 KB |
testcase_85 | AC | 171 ms
35,320 KB |
testcase_86 | AC | 170 ms
35,072 KB |
testcase_87 | AC | 171 ms
35,180 KB |
testcase_88 | AC | 170 ms
35,200 KB |
testcase_89 | AC | 170 ms
35,072 KB |
testcase_90 | AC | 171 ms
35,200 KB |
testcase_91 | AC | 172 ms
35,456 KB |
testcase_92 | AC | 173 ms
35,424 KB |
testcase_93 | AC | 172 ms
35,200 KB |
testcase_94 | AC | 172 ms
35,840 KB |
testcase_95 | AC | 172 ms
35,328 KB |
testcase_96 | AC | 173 ms
35,072 KB |
testcase_97 | AC | 172 ms
35,200 KB |
testcase_98 | AC | 169 ms
35,312 KB |
testcase_99 | AC | 66 ms
30,208 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (240 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let D = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991" let f n = seq { for i in D.Length-1..-1..0 -> n * int D.[i..i] } let g m n = Seq.zip (seq { yield 0; yield! f m; yield 0; }) (seq { yield! f n; yield 0; yield 0; }) let rec iter i c sq = let e = c + Seq.head sq seq { yield e%10 if i>0 then yield! iter (i-1) (e/10) (Seq.skip 1 sq) else if c<>0 && e/10<>0 then yield e/10 } let rec iter2 i c sq = let (e1,e2) = Seq.head sq seq { yield (e1+e2+c)%10 if i>0 then yield! iter2 (i-1) ((e1+e2+c)/10) (Seq.skip 1 sq) else if c<>0 && (e1+e2+c)/10<>0 then yield (e1+e2+c)/10 } let fmt = Seq.map string >> Seq.fold (fun a e -> e + a) "" >> fun (s:string) -> if s.Length<>D.Length then s.[0..s.Length-D.Length-1] + "." + s.[s.Length-D.Length..s.Length-1] else "0." + s let s = stdin.ReadLine() match s.Length with | 1 -> iter (D.Length-1) 0 (f (int s)) |> fmt | 2 -> iter2 D.Length 0 (g (int s.[0..0]) (int s.[1..1])) |> fmt | _ -> D.[0..1] + "." + D.[2..D.Length-1] |> printfn "%s"