2013年3月12日

SGU106 - The equation

摘要: 106. The equationtime limit per test: 0.5 sec.memory limit per test: 4096 KBThere is an equation ax + by + c = 0. Given a,b,c,x1,x2,y1,y2 you must determine, how many integer roots of this equation are satisfy to the following conditions : x1<=x<=x2, y1<=y<=y2. Integer root of this equat 阅读全文

posted @ 2013-03-12 23:55 仗剑奔走天涯 阅读(359) 评论(0) 推荐(0) 编辑

SGU123 - The sum

摘要: 123. The sumtime limit per test: 0.5 sec.memory limit per test: 4096 KBThe Fibonacci sequence of numbers is known: F1= 1; F2= 1; Fn+1= Fn+ Fn-1, for n>1.You have to findS- the sum of the firstKFibonacci numbers.InputFirst line contains natural numberK(0<K<41).OutputFirst line should contain 阅读全文

posted @ 2013-03-12 09:06 仗剑奔走天涯 阅读(174) 评论(0) 推荐(0) 编辑

UVA11520 - Fill the Square

摘要: Problem AFill the SquareInput:Standard InputOutput:Standard OutputIn this problem, you have to draw a square using uppercase English Alphabets.To be more precise, you will be given a square grid with some empty blocks and others already filled for you with some letters to make your task easier. You 阅读全文

posted @ 2013-03-12 01:07 仗剑奔走天涯 阅读(294) 评论(0) 推荐(0) 编辑

导航