| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 141317 | lmh | 22第n项的数 | C++ | Wrong Answer | 2 MS | 272 KB | 1750 | 2025-12-22 16:59:26 |
#include<iostream> using namespace std; int main (){ int date=0; char answer; cout<<"你的生日在这组数字里面吗?"<<endl; cout<<"1 3 5 7"<<endl; cout<<"9 11 13 15"<<endl; cout<<"17 19 21 23"<<endl; cout<<"25 27 29 31"<<endl; cout<<"如果有就输入Y,如果有就输入N"<<endl; cin>>answer; if(answer=='Y'){ date=date+1; }else{ date=date+0; } cout<<"你的生日在这组数字里面吗?"<<endl; cout<<" 2 3 6 7"<<endl; cout<<"10 11 14 15"<<endl; cout<<"18 19 22 23"<<endl; cout<<"26 27 30 31"<<endl; cout<<"如果有就输入Y,如果有就输入N"<<endl; cin>>answer; if(answer=='Y'){ date=date+2; }else{ date=date+0; } cout<<"你的生日在这组数字里面吗?"<<endl; cout<<"4 5 6 7"<<endl; cout<<"12 13 14 15"<<endl; cout<<"20 21 22 23"<<endl; cout<<"28 29 30 31"<<endl; cout<<"如果有就输入Y,如果有就输入N"<<endl; cin>>answer; if(answer=='Y'){ date=date+4; }else{ date=date+0; } cout<<"你的生日在这组数字里面吗?"<<endl; cout<<" 8 9 10 11"<<endl; cout<<"12 13 14 15"<<endl; cout<<"24 25 26 27"<<endl; cout<<"28 29 30 31"<<endl; cout<<"如果有就输入Y,如果有就输入N"<<endl; cin>>answer; if(answer=='Y'){ date=date+8; }else{ date=date+0; } cout<<"你的生日在这组数字里面吗?"<<endl; cout<<"16 17 18 19"<<endl; cout<<"20 21 22 23"<<endl; cout<<"24 25 26 27"<<endl; cout<<"28 29 30 31"<<endl; cout<<"如果有就输入Y,如果有就输入N"<<endl; cin>>answer; if(answer=='Y'){ date=date+16; }else{ date=date+0; } cout<<"你的生日日期是"<<date<<endl; return 0; }
------Input------
6 1 6 11 16
------Answer-----
26
------Your output-----
你的生日在这组数字里面吗? 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 如果有就输入Y,如果有就输入N 你的生日在这组数字里面吗? 2 3 6 7 10 11 14 15 18 19 22 23 26 27 30 31 如果有就输入Y,如果有就输入N 你的生日在这组数字里面吗? 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 如果有就输入Y,如果有就输入N 你的生日在这组数字里面吗? 8 9 10 11 12 13 14 15 24 25 26