結果
問題 |
No.648 お や す み
|
ユーザー |
|
提出日時 | 2022-10-24 12:16:49 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 798 ms |
コンパイル使用メモリ | 125,696 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 15:23:27 |
合計ジャッジ時間 | 2,724 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 54 WA * 30 |
ソースコード
#include <iostream> #include <cmath> using namespace std; using LL = long long; using ULL = unsigned long long; int main() { ULL n; cin >> n; ULL i = sqrt(n * 2); if (n * (n + 1) / 2 == n) { cout << "YES" << endl; cout << i << endl; } else { cout << "NO" << endl; } }