1 条题解
-
0
C++ :
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,x=0,y=0; cin>>a>>b>>c>>d>>e>>f; if(a>b){ x=x+1; }else{ y=y+1; } if(c>d){ x=x+1; }else{ y=y+1; } if(e>f){ x=x+1; }else{ y=y+1; } if(x > y){ cout<<"yangguang"; }else{ cout<<"leiting"; } }
Java :
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int x = A-a; int y = B-b; int z = C-c; int x1 = a-A; int y1 = b-B; int z1 = c-C; if(((x & y)|(x & z)|(y & z))>=1) { System.out.print("yangguang"); }else if(((x1 & y1)|(x1 & z1)|(y1 & z1))>=1) { System.out.print("leiting"); } } }
- 1
信息
- ID
- 2659
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者