1 条题解

  • 0
    @ 2021-6-15 12:57:52

    Pascal :

    var
    a:array[1..100] of longint;
    b:array[1..100] of longint;
    d:array[1..100] of char;
    n,i,s:longint;
    begin
    read(n);
    for i:=1 to n do
    read(a[i],b[i]);
    for i:=1 to n do
    s:=s+b[i];
    s:=s div n;
    for i:=1 to n do
    if b[i]+10<=s then d[i]:='C' else if b[i]-10>=s then d[i]:='A' else d[i]:='B';
    for i:=1 to n do
    writeln(a[i],' ',b[i],' ',d[i]);
    end.
    
    
    • 1

    信息

    ID
    779
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    3
    已通过
    1
    上传者