結果
問題 | No.648 お や す み |
ユーザー |
![]() |
提出日時 | 2018-03-10 00:44:40 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1,512 ms / 2,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 133 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-13 21:18:44 |
合計ジャッジ時間 | 33,944 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 84 |
ソースコード
#include<stdio.h>#include<inttypes.h>int main(){long long int i = 1;long long int n;scanf("%"SCNd64"",&n);while( (i*(i+1))/2 < n ){i++;}if( (i*(i+1))/2 == n ){printf("YES\n%lld\n",i);}else{printf("NO\n");}return 0;}