比赛链接

A题

1 -- Enter your code here. Read input from STDIN. Print output to STDOUT
2 main = do
3     x <- getLine
4     y <-  getLine
5     putStrLn $ reverse $ foldl (\acc (x, y) -> [y]++[x]++acc) [] $ zip x y

B题

1 -- Enter your code here. Read input from STDIN. Print output to STDOUT
2 import Data.List
3 main = do
4     inputdata <- getLine
5     putStrLn . concat . map (\xs -> f (head xs) (length xs)) . group $ inputdata
6         where
7             f ch len
8                 | len == 1 = [ch]
9                 | otherwise = [ch] ++ show len

C题

 1 -- Enter your code here. Read input from STDIN. Print output to STDOUT
 2 import Data.Char
 3 main::IO ()
 4 main = getContents >>= print . (\[n, k] -> superDigit ((read k) * getStrSum(n))) . words
 5
 6 superDigit::Int -> Int
 7 superDigit n
 8     | n < 10 = n
 9     | otherwise = superDigit . getSum $ n
10
11 getSum::Int -> Int
12 getSum 0 = 0
13 getSum n  = (n `rem` 10) + getSum ( n `div` 10)
14
15 getStrSum::String -> Int
16 getStrSum [] = 0
17 getStrSum (x:xs) = ord x - ord '0' + getStrSum xs 

D题

E题

转载于:https://www.cnblogs.com/Stomach-ache/p/3977844.html

Functional Programming Contest - September'14相关推荐

  1. Clojure入门教程: Clojure – Functional Programming for the JVM中文版

    http://xumingming.sinaapp.com/302/clojure-functional-programming-for-the-jvm-clojure-tutorial/ api:h ...

  2. Clojure – Functional Programming for the JVM中文版

    Clojure – Functional Programming for the JVM中文版 发表于 2011 年 12 月 07 日 由xumingming 作者: xumingming | 可以 ...

  3. Atcoder Keyence Programming Contest 2020 D - Swap and Flip

    Atcoder Keyence Programming Contest 2020 D - Swap and Flip 题目描述 Solution 写了一个简单的O(2nn(n+w))O(2^nn(n+ ...

  4. 【The 13th Chinese Northeast Collegiate Programming Contest】I. Temperature Survey

    题目描述 [题目链接](https://codeforces.com/gym/102220/problem/I) 给定长度为 $n$ 的 $a$ 序列,保证 $a_n \le n$,求有多少个长度为 ...

  5. Kotlin 函数式编程(Kotlin Functional Programming)

    Kotlin 函数式编程 (Kotlin Functional Programming)     陈光剑 1. 函数式概述 6 1.1. 函数式简史 6 1.2. 函数式编程语言家族 7 1.2.1. ...

  6. Programming Contest Ranking(题解)

    Programming Contest Ranking . 题目描述 Heilongjiang Programming Contest will end successfully! And your ...

  7. 2019 浙江省赛部分题解(The 16th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple)

    签到题 GLucky 7 in the Pocket Time Limit: 1 Second      Memory Limit: 65536 KB BaoBao loves number 7 bu ...

  8. (趋势)The 2002 Trend Micro Programming Contest, Preliminary

    The 2002 Trend Micro Programming Contest, Preliminary 蕷B氡呂?  蘥?╂賓Y?   Good Neighbors a???6摕   圓2d:&a ...

  9. Sichuan University Programming Contest 2018 Preliminary

    嗯为了防止大家AK,所以这次的A题和K题我们就当做不存在好了! 经历了昨天写了两个多小时的博客没保存的心态炸裂,今天终于下了个Markdown.所以我猜这篇的格式应该会更好看一点! 好吧废话不多说 题 ...

最新文章

  1. 直方图均衡化opencv(彩色、灰度图)
  2. 在 Ubuntu Linux 上从源代码构建 Qt 6.2.2的简短教程
  3. 张雨生林志炫高音对比
  4. 关系数据库和nosql
  5. 二十年编程语言风云,哪款是你的爱豆?
  6. 微信竟然可以查出行轨迹了,预计又一波情侣要分手?
  7. N使用exus2打造企业maven仓库(三)
  8. linux编程两个子进程,Linux中fork同时创建多个子进程的方法
  9. IDEA maven依赖下载失败
  10. 利用CNN和迁移学习方法识别植物叶片疾病
  11. Spring 框架学习 —— 容器
  12. Maven学习五之Nexus中各repository介绍
  13. C# WPF DataGrid在Grid中自适应窗体大小
  14. 给硬盘分个整数大小的区
  15. java 浏览器 爬虫_[Java教程]在浏览器客户端进行爬虫开发
  16. leetCode 318 最大单词长度乘积(位掩码,位运算,二进制)
  17. Ubuntu18.04 配置 bond4 + RG-5750-LACP
  18. pppd参数中文解释
  19. 14. echarts画双y轴
  20. 归并排序(递归,非递归)

热门文章

  1. OpenGL(glut)模拟太阳系:太阳,地球,月球,火星
  2. flower.php,flowerlist.php
  3. @ControllerAdvice注解(全局异常捕获)
  4. Maven 私服搭建指南
  5. Reveal真机查看任意APP
  6. php+tcpdf+表格,PHP中使用TCPDF生成PDF文档实例
  7. explode php 报错,PHP函数explode和split的区别
  8. Docker数据卷管理
  9. 鸿蒙系统啥时候发布新手机,鸿蒙系统新手机面世还有多远?明年3月发布的华为P40可能搭载...
  10. c语言编程常见问题解答 pdf,[编程语言]C语言常见问题集pdf pdf文件[1.35MB]-码姐姐下载...