Skip to content

Instantly share code, notes, and snippets.

@sooop
Last active December 16, 2015 12:29
Show Gist options
  • Save sooop/5434784 to your computer and use it in GitHub Desktop.
Save sooop/5434784 to your computer and use it in GitHub Desktop.
생활코딩
// 생코 두 번째 문제.
#import <Foundation/Foundation.h>
int main(int argc, char const *argv[])
{
int a, c1, c5, c10, c50, c100, c500;
scanf("%d", &a);
c500 = a / 500; a = a % 500;
c100 = a / 100; a = a % 100;
c50 = a / 50; a = a % 50;
c10 = a / 10; a = a % 10;
c5 = a / 5; c1 = a % 5;
printf("%d\n", c1+c5+c10+c50+c100+c500);
return 0;
}
@sooop
Copy link
Author

sooop commented Apr 22, 2013

왠지 중독성이 있어서 수정했습니다. 한결 낫네요.

@serivires
Copy link

줄 맞추기가 예술이네요. ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment