QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#204172 | #5279. New Time | OverLoad | Compile Error | / | / | C++23 | 682b | 2023-10-07 04:50:37 | 2023-10-07 04:50:38 |
Judging History
answer
var a = Console.ReadLine();
var minute = Convert.ToInt32((a[0])) * 10 + Convert.ToInt32(a[1]) * 60 + Convert.ToInt32(a[3]) * 10 + Convert.ToInt32(a[4]);
a = Console.ReadLine();
var real_minute = Convert.ToInt32(a[0]) * 10 + Convert.ToInt32(a[1]) * 60 + Convert.ToInt32(a[3]) * 10 + Convert.ToInt32(a[4]);
var real = real_minute - minute;
if (real > 0)
{
Console.WriteLine(Convert.ToInt32(real / 60) + real % 60);
}
else if(real < 0)
{
Console.WriteLine(Convert.ToInt32((1440 + real) / 60) + (1440 + real) % 60);
}
詳細信息
answer.code:1:2: error: ‘var’ does not name a type 1 | var a = Console.ReadLine(); | ^~~ answer.code:2:13: error: ‘var’ does not name a type 2 | var minute = Convert.ToInt32((a[0])) * 10 + Convert.ToInt32(a[1]) * 60 + Convert.ToInt32(a[3]) * 10 + Convert.ToInt32(a[4]); | ^~~ answer.code:3:13: error: ‘a’ does not name a type 3 | a = Console.ReadLine(); | ^ answer.code:4:13: error: ‘var’ does not name a type 4 | var real_minute = Convert.ToInt32(a[0]) * 10 + Convert.ToInt32(a[1]) * 60 + Convert.ToInt32(a[3]) * 10 + Convert.ToInt32(a[4]); | ^~~ answer.code:6:13: error: ‘var’ does not name a type 6 | var real = real_minute - minute; | ^~~ answer.code:8:13: error: expected unqualified-id before ‘if’ 8 | if (real > 0) | ^~ answer.code:12:13: error: expected unqualified-id before ‘else’ 12 | else if(real < 0) | ^~~~