본문 바로가기

전체 글

(2344)
(Android Studio 오류) - 안드로이드 apk Google Play Console 업로드시 뜨는 스키마 오류 manifest에
(C++) - 백준(BOJ) 2553번 : 마지막 팩토리얼 수 답 19996~19999까지 곱하게 된다면 5자리수 * 5자리수 * 5자리수 * 5자리수 이므로 숫자가 조단위가 됩니다. 이 점에 유의하셔야 시간초과를 피할 수 있습니다. 1234567891011121314151617#include #define ll long longusing namespace std; int main() { ll n,ans; cin >> n; ans = 1; for (int i = 1; i
(Android Studio) - Toast message 띄우기 Toast message 띄우는 법입니다. 토스트를 띄우기 원하는 곳에 다음 소스를 적용하면 됩니다. Toast.makeText( getApplicationContext(), "쓰고 싶은 말", 메시지 길이 설정).show();Toast.makeText(getApplicationContext(),"Hello~",Toast.LENGTH_SHORT).show();//LENGTH_SHORT는 2초동안 메세지 보여줌Toast.makeText(getApplicationContext(),"Hello~",Toast.LENGTH_LONG).show();//LENGTH_LONG는 3.5초동안 메세지 보여줌
(Android Studio) - Borderless 버튼을 눌렀을 때 생기는 잔상 제거 방법 android:background="#00ff0000"이 있는 xml 에 위 코드만 추가하시면 됩니다. 눌러도 투명하게 눌러집니다~
(Android Studio) - 툴바에 뒤로가기 버튼 만들기 import android.view.MenuItem;위 코드대로 import 해주시고 super.onCreate() 안에 이 코드를 추가합니다.첫 줄에 findViewById의 인자는 R.id.(xml에 지정해놓은 toobar의 아이디)입니다.Toolbar toolbar = findViewById(R.id.terms_toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); Activity와 super.onCreate() 사이에는 아래 코드를 추가합니다.@Override public boolean onOptionsItemSelected(MenuItem item ){ switch(item.getI..
(Android Studio) - Error running '<만든>Activity': The activity must be exported or contain an intent-filter Activity를 만들고 debugging시 manifest에 만든 Activity의 intent-filter가 없을시 시작할 수 없으므로 뜨는 오류입니다. Error running 'Activity': The activity must be exported or contain an intent-filter 실행을 원하는 Activity에 intent-filter를 추가해주시면 됩니다.
(C++) - 백준(BOJ) 15953번 : 상금헌터 답 간단한 입출력문제였습니다 12345678910111213141516171819202122232425262728293031323334#include using namespace std;int main() { int a, b, t; cin >> t; while(t--) { int price = 0; cin >> a >> b; if (a == 1) price += 5000000; else if (2
(C++) - 백준(BOJ) 10989번 : 수 정렬하기 3 답 시간을 최대한 단축하기 위해 싱크를 풀었습니다. 123456789101112#includeint n, j, a[10000];using namespace std;int main() { cin.tie(NULL); ios::sync_with_stdio(false); cin >> n; for (int i = 0; i > j; a[j - 1]++; } for (int i = 0; i