1. 程式人生 > >【水字元】#55 A. Word

【水字元】#55 A. Word

Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his favorite browser that would change the letters' register in every word so that it either only consisted of lowercase letters or, vice versa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse

 must be replaced with house, and the word ViP — with VIP. If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word.

相關推薦

字元#55 A. Word

Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his fav

輸入#52 A. Bar

A. Bar time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Accor

推理#72 A. Toy Army

A. Toy Army time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output

Codeforces Round #515 (Div. 3)A. Vova and Train

A. Vova and Train time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vova

51Nod-2148 字元出現位置

請你幫小瓜找一找某個字元在字串中第一次出現的位置是多少。 Input 第一行一個整數n(1 <=n <= 10000),表示字串的長度。 第二行一個長度為n的字串,保證每個字元都是小寫字母。 第三行一個字元,表示需要尋找的字元。 Output 一行一個

HDU - 2101 A + B Problem Too

A + B Problem Too Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21290 Accepted Submissio

HDU1000 A + B Problem

A + B Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 834475 Accepted Submission(s

Codeforces Round 332 (Div 2)AA. Patrick and Shopping 遍歷三元環的最小成本

Today Patrick waits for a visit from his friend Spongebob. To prepare for the visit, Patrick needs to buy some goodies in two stores located near his hous

矩陣 A+B

在數學中,矩陣是一個按照長方陣列排列的複數或實數集合,最早來自於方程組的係數及常數所構成的方陣。這一概念由19世紀英國數學家凱利首先提出。 矩陣是高等代數學中的常見工具,也常見於統計分析等應用數學學科中。在物理學中,矩陣於電路學、力學、光學和量子物理中都有應用;電腦科學中,三維動畫製作也需要用到矩陣。 矩陣

HDU1009_FatMouse&#39; Trade貪心

clu string.h gin ins center multiple rate int which FatMouse‘ Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/

洛谷P2911 [USACO08OCT]牛骨頭Bovine Bones

ace ans 水題 pac 輸入 using 範圍 end div 題目大意:輸入S1,S2,S3,隨機生成三個數x,y,z,求x+y+z出現次數最多的數(如果有多個答案輸出最小的),其中1<=x<=S1,1<=y<=S2,1<=z<=

編程珠璣第二章問題A

i++ 想是 == 散列 能夠 算法 ret 固定 無序 A題 給定一個最多包含40億個隨機排列的32位整數的順序文件,找出一個不在文件中一32位整數。有三個問題:(1)在文件中至少存在這樣一個數?(2)如果有足夠的內存,如何處理?(3)如果內存不足,僅可以用文件來進行處理

STLHDU2024C語言合法標識符

AI info targe == () 簡潔 技術分享 type #define 鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=2024 既然要求了全體同學都要刷完杭電100題,那我還是以身作則,也都給刷完吧~~~ 這些水題真的是

二分答案Problem A:天堂_珍珠

二分答案 分答 wap iostream 魔法 name tro div clas Problem A:天堂_珍珠 Time Limit:5000MS Memory Limit:65536KTotal Submit:232 Accepted:106 Descripti

FZU - 1759Super A^B mod C (數論,快速冪,快速乘,尤拉降冪,指數迴圈節,模板)

題幹: Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^1000000). Input There are mult

PAT甲級1002 A+B for Polynomials

This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file cont

PAT甲級1001 A+B Format

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there ar

Codeforces 637A Voting for Photos

http://codeforces.com/problemset/problem/637/A A. Voting for Photos time limit per test 1 second memory limit per test 256 megabytes inp

Wannafly Daily20170412 A 郭大俠與線上遊戲

https://cn.vjudge.net/contest/158362#problem/A 對前一半後一半分別維護一個set,操作時做相應調整即可 #include<stdio.h> #include<set> #include<queue>

藍橋杯BASIC-1 閏年判斷

問題描述 給定一個年份,判斷這一年是不是閏年。 當以下情況之一滿足時,這一年是閏年: 1. 年份是4的倍數而不是100的倍數; 2. 年份是400的倍數。 其他的年份都不是閏年。 輸入格式 輸入包含一個整數y,表示當前的年份。 輸出格式 輸出一行,如果給定的年份是