結果

問題 No.2185 平方数の下6桁
コンテスト
ユーザー OnjoujiToki
提出日時 2023-01-14 00:29:43
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 792 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 908 ms
コンパイル使用メモリ 141,780 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-29 07:51:58
合計ジャッジ時間 1,963 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <algorithm>
#include <array>
#include <bit>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>

void solve() {
  long long n;
  std::cin >> n;
  bool ok = false;
  for (long long a = 1; a <= 500000; a++) {
    if (a * a % 1000000 == n) {
      ok = true;
    }
  }
  if (ok) std::cout << "YES\n";
  else std::cout << "NO\n";
}
int main() {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  std::cout << std::boolalpha;
  int t = 1;
  // std::cin >> t;

  while (t--) solve();
  // solve();
  return 0;
}
0