[UVa #11547] Automatic Answer

tolelom·2022년 7월 3일
0

UVa

목록 보기
9/20

문제 설명

문제 링크
주어진 수에 주어진 계산을 한 결과의 십의 자리 수를 출력하라.

알고리즘

없음

코드

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define INF 1000000000

int t;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> t;
    for (int tc = 1; tc <= t; ++tc) {
        int n;
        cin >> n;

        int ans = (((((n * 567) / 9) + 7492) * 235) / 47) - 498;
        cout << abs((ans % 100) / 10) << '\n';
    }
}
profile
이것 저것 작성하는 기술 블로그

0개의 댓글