#37700: 個人答案(但不知道為何最後超時)


s11131045@nhsh.tp.edu.tw (10309彭鈺翔)

學校 : 不指定學校
編號 : 215218
來源 : [114.34.219.25]
最後登入時間 :
2024-01-21 09:55:00
d485. 我愛偶數 -- 板橋高中教學題 | From: [1.170.70.198] | 發表日期 : 2023-09-29 23:29

int main(){
       int a,b,n=0;
       cin >> a;
       cin >> b;
       for(int i = a;i<=b;i++){
              n+= ((i%2)+1)%2;
       }
       cout << n;
       return 0;
}

 
ZeroJudge Forum