[例子:001]判断输入为数字,字符或其他 #!/bin/bash read -p "Enter a number or string here:" input case $input in [0-9]) echo -e "Good job, Your input is a numberic! \n" ;; [a-zA-Z]) echo -e "Good job, Your input is a character! \n" ;; *) echo…
gym链接:CCPC 2020 changchun site A: 题目大意:商店里有若干个充值档位和首充奖励,你有\(n\)块钱问最多能拿到多少水. 解:由于档位不多可以直接枚举,整个二进制枚举一下所有方案就可以了.不要陷入贪心的方向,因为可能买便宜的会更多. 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; #define forn(i,x,n) for(int i = x;i <= n;+…