原创 1503. Integer Inquiry

Description One of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration of power

原创 3299. Humidex

Description Adapted from Wikipedia, the free encyclopedia The humidex is a measurement used by Canadian meteorologi

原创 3252. Round Numbers

Description The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone’ (a

原创 2739. Sum of Consecutive Prime Numbers

Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many s

原创 2262. Goldbach's Conjecture

Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which h

原创 3006. Dirichlet's Theorem on Arithmetic Progressions

Description If a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increas

原创 2159. Ancient Cipher

Description Ancient Roman empire had a strong government system with various departments, including a secret servic

原创 1083. Moving Tables

Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the

原创 A除以B

本題要求計算A/B,其中A是不超過1000位的正整數,B是1位正整數。你需要輸出商數Q和餘數R,使得A = B * Q + R成立。 輸入格式: 輸入在1行中依次給出A和B,中間以1空格分隔。 輸出格式: 在1行中依次

原创 部分A+B

正整數A的“DA (爲1位整數)部分”定義爲由A中所有DA 組成的新整數PA 。例如:給定A = 3862767,DA = 6,則A的“6部分”PA 是66,因爲A中有2個6。 現給定A、DA 、B、DB ,請編寫程序計算PA

原创 3094. Quicksum

Description A checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if

原创 個位數統計

給定一個k位整數N = dk−1∗10k−1+...+d1∗101+d0(0<=di<=9,i=0,...,k−1,dk−1>0) ,請編寫程序統計每種不同的個位數字出現的次數。例如:給定N = 100311,則有2個0,3個1,

原创 組個最小數

給定數字0-9各若干個。你可以以任意順序排列這些數字,但必須全部使用。目標是使得最後得到的數儘可能小(注意0不能做首位)。例如:給定兩個0,兩個1,三個5,一個8,我們得到的最小的數就是10015558。 現給定數字,請編寫程

原创 1019. Number Sequence

Description A single positive integer i is given. Write a program to find the digit located in the position i in th

原创 D進制的A+B

輸入兩個非負10進制整數A和B(<=230−1 ),輸出A+B的D (1 < D <= 10)進制數。 輸入格式: 輸入在一行中依次給出3個整數A、B和D。 輸出格式: 輸出A+B的D進制數。 輸入樣例: 12