Created
May 25, 2017 17:01
-
-
Save rainbow23/7d12fe936b8704abf287c8669c3bda04 to your computer and use it in GitHub Desktop.
paiza
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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