上紫啦!
E题1:59压哨提交成功翻盘
(1:00就做完了调了一个小时,还好意思说出来? (逃))
题面太长就不复制了,但是配图很可爱所以要贴过来
九条可怜酱好可爱呀
询问从当前时刻过多久,时间会形成回文串的形式。
暴力呀暴力
1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<cstdio> 5 #include<cmath> 6 using namespace std; 7 int read(){ 8 int x=0,f=1;char ch=getchar(); 9 while(ch<'0' || ch>'9'){if(ch=='-')f=-1;ch=getchar();} 10 while(ch>='0' && ch<='9'){x=x*10+ch-'0';ch=getchar();} 11 return x*f; 12 } 13 int a,b; 14 int test(){ 15 if(a/10 == b%10 && a%10==b/10)return 1; 16 return 0; 17 } 18 int main(){ 19 a=read();b=read(); 20 for(int i=0;i>=0;i++){ 21 if(test()){ 22 printf("%d\n",i); 23 return 0; 24 } 25 b++; 26 if(b>59)b=0,a++; 27 if(a>23)a=0; 28 } 29 return 0; 30 }