반응형


문제 설명

https://www.acmicpc.net/problem/4922

 

 

 

제출한 코드

#include <stdio.h>
int main(void){
    int a;
    while (1){
        scanf("%d", &a);
        if (a==0) break;
        printf("%d => %d\n", a, a*a-(a-1));
    }
    return 0;
}

 

 

 

 

결과

 

 

후기

 

 

 

 



 
반응형
반응형


문제 설명

https://www.acmicpc.net/problem/1316

 

 

 

제출한 코드

num = int(input())
total = 0

for i in range(num) :
    word = input()
    j = 0
    while j<len(word):
        if word.count('*', j,len(word))>0 :
            break
        a = word.count(word[j])
        word = word.replace(word[j],'*')
        if a>1 :
            j += a-1
        if j==len(word)-1 :
            total+=1
        j+= 1

print(total)

 

 

 

 

결과

 

 

후기

 

 

 

 



반응형
반응형

문제 설명

https://www.acmicpc.net/problem/1271

 

 

 

제출한 코드

from sys import stdin

a, b = map(int, stdin.readline().split())

print(a//b)
print(a%b)

 

 

 

 

결과

 

 

 

후기

 

 

 

 



반응형

+ Recent posts