标签:code begin 情况 names http car lag lib ace
http://oj.lcsyzx.cn/JudgeOnline/problem.php?id=1049
var a : string[10]; m,n,t : integer; begin readln(m); n:= 0; t:= m ; while m > 0 do begin readln(a); Case a[1] of { 关于情况处理 } ‘A‘,‘B‘,‘C‘,‘D‘,‘E‘,‘F‘,‘G‘,‘R‘,‘S‘,‘T‘ : n := n + 1; end; m := m - 1; end; writeln(t - n); end.
#include <iostream> #include <iomanip> #include <cstdlib> #include <string> using namespace std; int main(){ int n; int m = 0; string a; cin>>n; while(n-->0) { cin>>a; switch(a[0]) { case ‘A‘: case ‘B‘: case ‘C‘: case ‘D‘: case ‘E‘: case ‘F‘: case ‘G‘: case ‘R‘: case ‘S‘: case ‘T‘: m++; break; } } cout<<m<<endl; // cout<<setiosflags(ios::fixed)<<setprecision(4)<<s<<endl; // cout<< setiosflags(ios::fixed)<<setprecision(4) <<c<<endl; }
标签:code begin 情况 names http car lag lib ace
原文地址:http://www.cnblogs.com/shiningrise/p/6501919.html