为什么AC了?!

P1001 A+B Problem

Monkey_Hunter @ 2020-01-24 09:34:52

import java.io.*;
import java.util.*;
public class Main
{
    public static void main(String args[])
    {
        Scanner 输入=new Scanner(System.in);
        int 数一=输入.nextInt(),数二=输入.nextInt();
        System.out.println(数一+数二);
    }
}

Java可以用中文定义变量?!


by Eason2009 @ 2020-02-27 19:58:14

@嫐嬲巭孬 笑死我


by xhQYm @ 2020-04-07 18:31:51

好像不行啊:

/sandbox/1/a.cpp:4:5: error: stray '\347' in program
     int 猪, 狗;
     ^
/sandbox/1/a.cpp:4:5: error: stray '\214' in program
/sandbox/1/a.cpp:4:5: error: stray '\252' in program
/sandbox/1/a.cpp:4:5: error: stray '\347' in program
/sandbox/1/a.cpp:4:5: error: stray '\213' in program
/sandbox/1/a.cpp:4:5: error: stray '\227' in program
/sandbox/1/a.cpp:5:5: error: stray '\347' in program
     cin >> 猪 >> 狗;
     ^
/sandbox/1/a.cpp:5:5: error: stray '\214' in program
/sandbox/1/a.cpp:5:5: error: stray '\252' in program
/sandbox/1/a.cpp:5:5: error: stray '\347' in program
/sandbox/1/a.cpp:5:5: error: stray '\213' in program
/sandbox/1/a.cpp:5:5: error: stray '\227' in program
/sandbox/1/a.cpp:6:5: error: stray '\347' in program
     int 牛逼 = 猪 + 狗;
     ^
/sandbox/1/a.cpp:6:5: error: stray '\211' in program
/sandbox/1/a.cpp:6:5: error: stray '\233' in program
/sandbox/1/a.cpp:6:5: error: stray '\351' in program
/sandbox/1/a.cpp:6:5: error: stray '\200' in program
/sandbox/1/a.cpp:6:5: error: stray '\274' in program
/sandbox/1/a.cpp:6:5: error: stray '\347' in program
/sandbox/1/a.cpp:6:5: error: stray '\214' in program
/sandbox/1/a.cpp:6:5: error: stray '\252' in program
/sandbox/1/a.cpp:6:5: error: stray '\347' in program
/sandbox/1/a.cpp:6:5: error: stray '\213' in program
/sandbox/1/a.cpp:6:5: error: stray '\227' in program
/sandbox/1/a.cpp:7:5: error: stray '\347' in program
     cout << 牛逼;
     ^
/sandbox/1/a.cpp:7:5: error: stray '\211' in program
/sandbox/1/a.cpp:7:5: error: stray '\233' in program
/sandbox/1/a.cpp:7:5: error: stray '\351' in program
/sandbox/1/a.cpp:7:5: error: stray '\200' in program
/sandbox/1/a.cpp:7:5: error: stray '\274' in program
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:4:12: error: expected unqualified-id before ',' token
     int 猪, 狗;
            ^
/sandbox/1/a.cpp:4:17: error: expected unqualified-id before ';' token
     int 猪, 狗;
                 ^
/sandbox/1/a.cpp:5:16: error: expected primary-expression before '>>' token
     cin >> 猪 >> 狗;
                ^
/sandbox/1/a.cpp:5:22: error: expected primary-expression before ';' token
     cin >> 猪 >> 狗;
                      ^
/sandbox/1/a.cpp:6:16: error: expected unqualified-id before '=' token
     int 牛逼 = 猪 + 狗;
                ^
/sandbox/1/a.cpp:7:19: error: expected primary-expression before ';' token
     cout << 牛逼;
                   ^

by xhQYm @ 2020-04-07 18:32:08

我说提交到LOJ上面。。


by zhuziyue123 @ 2020-04-26 19:40:16

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

by Polarie @ 2022-08-12 15:55:11

?????????????? ~~~~ 在线发问
你在写个神马玩应儿


上一页 |