#43518: AC (0.3s, 88KB)


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)

School : 臺北市立建國高級中學
ID : 266561
IP address : [60.248.154.139]
Last Login :
2025-03-12 12:39:04
a170. 天才的小明 -- 愷愷 | From: [60.248.154.139] | Post Date : 2024-10-21 14:00

#include <stdio.h>        //用這標準庫比較快
//不須usingnamespace std;因為不會用到
int main() {
long int a, b;
long int c;
    scanf("%lld", &c);        //用scanf和printf比cout和cin快
while (c--){        //比for迴圈快
    scanf("%lo %llo", &a, &b);        //用%llo讀取long int的八進位,並分別儲存於a和b中
    printf("%lX\n", a + b);        //用%lX讀取long int的十六進位
}
return 0;
}

 
#43519: Re: AC (0.3s, 88KB)


1121226@stu.wghs.tp.edu.tw (Arthur1121226)

School : 臺北市私立薇閣高級中學
ID : 252772
IP address : [60.248.154.143]
Last Login :
2025-03-19 15:28:44
a170. 天才的小明 -- 愷愷 | From: [60.248.154.139] | Post Date : 2024-10-21 14:12

#include        //用這標準庫比較快
//不須usingnamespace std;因為不會用到
int main() {
long int a, b;
long int c;
    scanf("%lld", &c);        //用scanf和printf比cout和cin快
while (c--){        //比for迴圈快
    scanf("%lo %llo", &a, &b);        //用%llo讀取long int的八進位,並分別儲存於a和b中
    printf("%lX\n", a + b);        //用%lX讀取long int的十六進位
}
return 0;
}

👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕💕

 
ZeroJudge Forum