标签:turn bsp += main color scan col ret code
#include <stdio.h> int main() { int g1,s1,k1,g2,s2,k2,g,s,k,g3,g4,s3,s4,k3,k4; scanf("%d.%d.%d %d.%d.%d",&g1,&s1,&k1,&g2,&s2,&k2); g3=g1;g4=g2;s3=s1;s4=s2;k3=k1;k4=k2; k=k2-k1; if(k<0) { s2--; k+=29; } s=s2-s1; if(s<0) { g2--; s+=17; } g=g2-g1; if(g<0) { k=k3-k4; if(k<0) { s3--; k+=29; } s=s3-s4; if(s<0) { g3--; s+=17; } g=g3-g4; printf("-%d.%d.%d\n",g,s,k); } else printf("%d.%d.%d\n",g,s,k); return 0; }
标签:turn bsp += main color scan col ret code
原文地址:https://www.cnblogs.com/QRain/p/12251718.html