結果
問題 | No.3072 Sum of sqrt(x) |
ユーザー | ciel |
提出日時 | 2020-10-26 18:42:10 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,427 bytes |
コンパイル時間 | 1,809 ms |
コンパイル使用メモリ | 23,812 KB |
実行使用メモリ | 6,408 KB |
最終ジャッジ日時 | 2023-09-29 02:46:26 |
合計ジャッジ時間 | 23,019 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,180 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 0 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 0 ms
4,380 KB |
testcase_06 | AC | 1 ms
4,380 KB |
testcase_07 | AC | 1,655 ms
4,380 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
ソースコード
#include <stdio.h> #include <quadmath.h> /// dlfcn.h /// #ifdef __cplusplus extern "C"{ #endif #if defined(WIN32) || (!defined(__GNUC__) && !defined(__clang__)) void* LoadLibraryA(const char *x); void* GetProcAddress(void *x,const char *y); int FreeLibrary(void *x); #elif defined(__APPLE__) void* dlopen(const char *x,int y); void* dlsym(void *x,const char *y); int dlclose(void *x); #define LoadLibraryA(s) dlopen(s,2) #define GetProcAddress dlsym #define FreeLibrary dlclose #else void* __libc_dlopen_mode(const char *x,int y); void* __libc_dlsym(void *x,const char *y); int __libc_dlclose(void *x); #define LoadLibraryA(s) __libc_dlopen_mode(s,2) #define GetProcAddress __libc_dlsym #define FreeLibrary __libc_dlclose #endif #ifdef __cplusplus } #endif typedef __float128 (*type_sqrtq)(__float128); typedef int (*type_quadmath_snprintf)(char *s, size_t size, const char *format, ...); type_sqrtq mysqrtq; type_quadmath_snprintf myquadmath_snprintf; char buf[99]; int main(){ //void *H=LoadLibraryA("/usr/local/lib/gcc/10/libquadmath.dylib"); void *H=LoadLibraryA("/usr/lib64/libquadmath.so"); mysqrtq=(type_sqrtq)GetProcAddress(H,"sqrtq"); myquadmath_snprintf=(type_quadmath_snprintf)GetProcAddress(H,"quadmath_snprintf"); int T; long long x; __float128 d; for(scanf("%d",&T);T--;){ scanf("%lld",&x); d+=mysqrtq(x); myquadmath_snprintf(buf,99,"%.16Qg",d); puts(buf); } return 0; }