国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

PAT-B 1012. 數字分類 (20)

2019-11-10 16:55:50
字體:
來源:轉載
供稿:網友

題目鏈接在此。

#include<stdio.h>int main(){ int n; int temp; double a1=0,a2=0,a3=0,a4=0,a5=0; int zero[10000],one[10000],two[10000],three[10000],four[10000]; int z=0,o=0,tw=0,th=0,f=0; scanf("%d",&n); for(int i = 0 ; i < n; i++){ scanf("%d",&temp); if(temp % 5 == 0){ zero[z++] = temp; }else if(temp % 5 == 1){ one[o++] = temp; }else if(temp % 5 == 2){ two[tw++] = temp; }else if(temp % 5 == 3){ three[th++] = temp; }else if(temp % 5 == 4){ four[f++] = temp; } } //求A1 int A1 = 0; for(int i = 0 ; i < z; i++){ if(zero[i]%2 == 0){ A1 += zero[i]; } } if(A1 == 0){
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 翁源县| 大冶市| 海盐县| 大名县| 隆化县| 区。| 五寨县| 海阳市| 屏东市| 大英县| 延庆县| 大宁县| 盐津县| 乌鲁木齐市| 金华市| 蛟河市| 承德市| 达日县| 德格县| 天长市| 永和县| 万盛区| 繁昌县| 青铜峡市| 禹城市| 无极县| 涟源市| 平利县| 仲巴县| 伽师县| 岳阳县| 平顺县| 鄂托克旗| 凤城市| 都昌县| 浮山县| 启东市| 望谟县| 西吉县| 安宁市| 稻城县|