結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-02-13 21:09:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 556 ms |
| コンパイル使用メモリ | 64,496 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 11:49:41 |
| 合計ジャッジ時間 | 2,571 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 80 WA * 4 |
ソースコード
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
unsigned long long N,ans,i;
cin >> N;
ans = (sqrt(8*N+1)-1)/2;
for(i=ans-50;i<ans+50;i++){
if(ans*(ans+1)==2*N){
cout << "YES\n" << ans << endl;
return 0;
}
}
cout << "NO" << endl;
return 0;
}
focus