Skip to content

이주성#1

Open
zusung47 wants to merge 13 commits into
mainfrom
homework_jusung
Open

이주성#1
zusung47 wants to merge 13 commits into
mainfrom
homework_jusung

Conversation

@zusung47

@zusung47 zusung47 commented May 2, 2023

Copy link
Copy Markdown

No description provided.

DESKTOP-OMBAS04\anty3 added 4 commits May 2, 2023 15:46
문제 풀이 완료
문제 풀이 완료
문제 풀이 완료
int answer = 0;
String str = Integer.toString(n);
for(char x : str.toCharArray()){
int a = x - 48;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

멋있어요 😍

int a = x - 48;
answer = answer + a;
}
return answer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integer.toString 배우고 갑니다 굿

DESKTOP-OMBAS04\anty3 added 5 commits May 4, 2023 09:34
문제 풀이 완료
문제 풀이 완료
문제 풀이 완료
문제 풀이 완료
문제 풀이 완료
return false;
}
for(int i = 0; i<arr.length; i++){
if(arr[i]<'0' || arr[i]>'9'){

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문자 직접 비교하는 방법 좋네요👍👍

DESKTOP-OMBAS04\anty3 added 4 commits May 9, 2023 23:01
문제 풀이 완료
문제 풀이 완료
문제 풀이 완료
StringBuilder를 쓰면 실행시간이 줄어듬
문제 풀이 완료
매개변수의 자료형이 int이면 오버플로우 발생으로 자료형을 long으로 바꿔줘야함
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants