100 Accepted

# 状态 分数 耗时 内存占用
#1 Accepted 11 0ms 7.4 MiB
#2 Accepted 11 1ms 7.4 MiB
#3 Accepted 11 1ms 7.4 MiB
#4 Accepted 11 1ms 7.4 MiB
#5 Accepted 11 1ms 7.5 MiB
#6 Accepted 11 0ms 7.4 MiB
#7 Accepted 11 0ms 7.4 MiB
#8 Accepted 11 1ms 7.5 MiB
#9 Accepted 12 1ms 7.5 MiB

代码

#include <iostream>
using namespace std;
int main()
{
    int n, x = 0;
    cin >> n;
    for (int i = 10;i <= 31;i++)
    {
        int a, b, c;
        a = i*i/100;
        b = i*i/10%10;
        c = i*i%10;
        if (a == b || a == c || b == c)
        {
            ++x;
        }
        if (n == x)
        {
            cout << i*i << endl;
            break;
        }
    }
    return 0;
}

信息

递交者
题目
DJKS1005  求满足条件的 3 位数
比赛
2024年3月等考一级题单
语言
C++ 98
递交时间
1 年前
评测时间
1 年前
分数
100
总耗时
6ms
峰值内存
7.5 MiB