代码求调
  • 板块灌水区
  • 楼主_cruelworld_
  • 当前回复3
  • 已保存回复3
  • 发布时间2023/2/23 17:14
  • 上次更新2023/10/24 00:02:12
查看原帖
代码求调
947491
_cruelworld_楼主2023/2/23 17:14

P8722 全WA


#include<bits/stdc++.h>
using namespace std;
string a[100005]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};//定义数组 a,储存字符串。
int main()
{
	string yue;//月份
   	for(int i=0;i<=100005;i++)
    	{
    	    if(yue==a[i])
            {
                cout<<i+1<<" ";
            }
        
        }
	string s;//日
    cin>>s;
    if(s[0]=='0')
    {
    	cout<<s[1];
    }
    else
    {
    	cout<<s;
    }
    return 0;
}
2023/2/23 17:14
加载中...