Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rainbow23/7d12fe936b8704abf287c8669c3bda04 to your computer and use it in GitHub Desktop.
Save rainbow23/7d12fe936b8704abf287c8669c3bda04 to your computer and use it in GitHub Desktop.
paiza
#include <stdio.h>
#include <string.h>
int main(void){
// 自分の得意な言語で
// Let's チャレンジ!!
char line[1000];
fgets(line, sizeof(line), stdin);
char *pLine;// = NULL;
pLine = strtok(line, " ");
int needSutamina = atoi(pLine);
pLine = strtok(NULL, " ");
int nowSutamina = atoi(pLine);
int result = nowSutamina - needSutamina;
if(result >= 0)
{
char buff[100];
sprintf(buff, "%d", result);
printf("%s", buff);
}
else
{
printf("No");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment