結果
問題 | No.648 お や す み |
ユーザー |
![]() |
提出日時 | 2018-05-27 09:58:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 1,261 ms |
コンパイル使用メモリ | 158,300 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 18:24:22 |
合計ジャッジ時間 | 3,046 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 WA * 31 |
ソースコード
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++) i64 n; int main(){ cin >> n; i64 r = sqrt(1 + 8 * n); if(1 + 8 * n == r * r){ cout << "YES" << endl; cout << r << endl; } else{ cout << "NO" << endl; } }