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