29 [程序 29 求矩阵对角线之和] 题目:求一个 3*3 矩阵对角线元素之和 程序分析:利用双重 for 循环控制输入二维数组,再将 a[i][i]累加后输出. package cskaoyan; public class cskaoyan29 { @org.junit.Test public void diagonal() { java.util.Scanner in = new java.util.Scanner(System.in); int[][] arr = new int[3][…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vanya is doing his maths homework. He has an expression of form , where x1, x2, -, xn are digits from 1 to 9, and sign represents either a plus '…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so afte…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable. In total the table A…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Amr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment. Amr has n different types of chemicals. E…
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Anton likes to play chess, and so does his friend Danik. Once they have played n games in a row. For each game it's known who was the winner - An…