1 条题解
-
0
C :
#include<stdio.h> int main() { int a,b,c; scanf("%d%d",&a,&b); c=a,a=b,b=c; printf("%d %d\n",a,b); return 0; }C++ :
#include<stdio.h> int main() { int a,b,c; scanf("%d %d",&a,&b); c=a; a=b; b=c; printf("%d %d",a,b); return 0; }Java :
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input=new Scanner(System.in); int n=input.nextInt(); int m=input.nextInt(); int t=n; n=m; m=t; System.out.println(n+" "+m); } }Python :
# coding=utf-8 #python2 a,b=map(int,raw_input().split()) c=a a=b b=c print a,bC# :
using System; using System.Collections.Generic; using System.Diagnostics.SymbolStore; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace ConsoleApp2 { internal class Program { static void Main() { //int[] days = { 31,28,31,30,31,30,31,31,30,31,30,31}; string[] a1 = Console.ReadLine().Split(); string a = a1[1]; string b = a1[0]; Console.WriteLine(a+" "+b); Console.ReadKey(); } } }
- 1
信息
- ID
- 14
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者