每天一翻译2

Simple Math Problem

 1000ms  131072K

描述:

Tongtong is playing math game again. She had come across this square matrix many times,so needless to say, she knows what you want to ask. Now she throws this question to you. You need to look at the following square matrix,then she will give you three integers n,x,and y,that means there are an n×n square matrix.

You need to figure out what the value of row x, column y corresponds to.

For example,there are one 5×5 square matrix:

       0   1   3   6   A  
       2   4   7   B   F
       5   8   C  10  13
       9   D  11  14  16
       E  12  15  17  18

输入:

Only a single line contains three integers n,x,y(0≤x≤1000000000,0≤y≤1000000000,1≤n≤1000000001)n,x,y(0≤x≤1000000000,0≤y≤1000000000,1≤n≤1000000001)

输出:

A single line with an integer representing the corresponding value.

样例输入:

5 2 2

样例输出:

12

1月18:

描述:

童童再一次玩起来数学游戏,她已经有很多次遇到这个方阵,所以不用说,她知道你想要说什么。现在,她把这个问题给你,你需要看如下的方阵,然后她将会给你三个整数n,x,和y,这意味着这里有一个n*n的方阵。

你需要想出行x,列y对应的什么值。

比如,这里有一个5*5的方阵:

       0   1   3   6   A  

       2   4   7   B   F

       5   8   C  10  13

       9   D  11  14  16

       E  12  15  17  18

输入:

只有单独的一行包括了三个整数n,x,y(0<=x<=1000000000,0<=y<1000000000,1<=1000000001)

输出:

有着一个整数代表对应值的单独的一行

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值