哈尔滨工业大学

哈尔滨工业大学 最大公约数(java)

主宰稳场 提交于 2020-02-12 12:10:09
题目描述 输入两个正整数,求其最大公约数。 输入描述: 测试数据有多组,每组输入两个正整数。 输出描述: 对于每组输入,请输出其最大公约数。 示例1 输入 复制 49 14 输出 复制 7 import java . util . * ; import java . io . * ; import java . text . * ; public class Main { public static void main ( String [ ] args ) { try { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String str ; while ( ( str = br . readLine ( ) ) != null ) { String [ ] parts = str . split ( " " ) ; int a = Integer . parseInt ( parts [ 0 ] ) ; int b = Integer . parseInt ( parts [ 1 ] ) ; //let a be the smaller one if ( a > b ) { int tmp = a ; a = b ; b = tmp ; } int i = a

射线检测

做~自己de王妃 提交于 2020-01-17 19:24:53
射线检测单个游戏对象 //射线检测一个游戏对象 Ray ray = Camera . main . ScreenPointToRay ( Input . mousePosition ) ; RaycastHit hit ; bool isRaycast = Physics . Raycast ( ray , out hit ) ; if ( isRaycast ) { Debug . DrawLine ( ray . origin , hit . point , Color . green ) ; print ( "坐标" + hit . transform . position ) ; print ( "碰撞到点的坐标" + hit . point ) ; print ( "重心坐标" + hit . barycentricCoordinate ) ; print ( "碰撞盒" + hit . collider ) ; print ( "距离" + hit . distance ) ; print ( "光线地图坐标" + hit . lightmapCoord ) ; print ( "法线" + hit . normal ) ; print ( "刚体" + hit . rigidbody ) ; print ( "纹理坐标" + hit . textureCoord )

rosdep报错

吃可爱长大的小学妹 提交于 2019-12-02 10:08:31
rosdep安装时报错 reading in sources list data from /etc/ros/rosdep/sources.list.d Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]: Failed to download target platform data for gbpdistro: <urlopen error [Errno -2] Name or service