結果
問題 |
No.648 お や す み
|
ユーザー |
|
提出日時 | 2017-09-20 11:00:57 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 109 bytes |
コンパイル時間 | 126 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 20:43:07 |
合計ジャッジ時間 | 1,959 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 84 |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int] 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} | ^~~~ main.c: In function 'main': main.c:1:22: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} main.c:1:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} | ^~~~~ main.c:1:22: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:52: warning: implicit declaration of function 'sqrtl' [-Wimplicit-function-declaration] 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} | ^~~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrtl' +++ |+#include <math.h> 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} main.c:1:52: warning: incompatible implicit declaration of built-in function 'sqrtl' [-Wbuiltin-declaration-mismatch] 1 | main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);} | ^~~~~ main.c:1:52: note: include '<math.h>' or provide a declaration of 'sqrtl' main.c:1:65: warning: implicit declaration of function 'printf' [-Wimplicit-function-d
ソースコード
main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q<n||q%2==0?"NO":"YES\n%lld",q-1>>1);}