2 条题解

  • 0
    @ 2025-5-3 8:18:19
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        cout<<300<<endl<<3000<<endl<<40000<<endl<<-300;
        return 0;
    }
    
    • 0
      @ 2024-12-24 9:49:25

      C :

      #include <stdio.h>
      
      int main()
      {
      	int a,b;
      
      	while(scanf("%d%d",&a,&b)!=EOF)
      		printf("%d\n",a+b);
      	
      	return 0;
      }
      

      C++ :

      #include <iostream>
      using namespace std;
      
      int main()
      {
      	int a,b;
      
      	while(cin>>a>>b)
      		cout<<a+b<<endl;
      	
      	return 0;
      }
      

      Java :

      import java.util.Scanner;
      
      public class Main 
      {
      	public static void main(String[] args) 
      	{
      		Scanner sc = new Scanner(System.in);
      
      		while(sc.hasNextInt())
      		{
      			int a = sc.nextInt();
      			int b = sc.nextInt();
      			System.out.println(a+b);
      		}
      	}
      }
      
      • 1

      信息

      ID
      959
      时间
      1000ms
      内存
      32MiB
      难度
      10
      标签
      (无)
      递交数
      8
      已通过
      2
      上传者