摘要:
2756. Lucky Transformation Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains o 阅读全文
摘要:
2776. String Task Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to 阅读全文
摘要:
2794. Petya and Strings Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercas 阅读全文
摘要:
2810. Palindromic Times Tattah is asleep if and only if Tattah is attending a lecture. This is a well-known formula among Tattah's colleagues. On a We 阅读全文
摘要:
14. Football Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of 阅读全文
摘要:
Sum of Digits Having watched the last Harry Potter film, little Gerald also decided to practice magic. He found in his father's magical book a spell t 阅读全文
摘要:
package ch06; public class Fibonacci { public static int getNumber(int n) { if(n == 1) { return 0; } else if(n == 2){ return 1; } else { ... 阅读全文
摘要:
package ch03; /* * 队列类 */ public class MyQueue { // 底层实现是一个数组 private long[] arr; // 有效数据大小 private int elements; // 队头 private int front; // 队尾 private int end; ... 阅读全文
摘要:
package ch03; public class MyStack { // 底层实现是一个数组 private long[] arr; private int top; /** * 默认的构造方法 */ public MyStack() { arr = new long[10]; top = -1... 阅读全文