結果
問題 | No.280 歯車の問題(1) |
ユーザー |
|
提出日時 | 2015-11-12 20:56:53 |
言語 | C++11 (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 700 bytes |
コンパイル時間 | 263 ms |
コンパイル使用メモリ | 34,560 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 14:31:39 |
合計ジャッジ時間 | 6,362 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 31 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:36:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int*’, but argument 2 has type ‘ull’ {aka ‘long long unsigned int’} [-Wformat=] 36 | rep(i,n-1) scanf("%llu",end); | ~~~^ ~~~ | | | | | ull {aka long long unsigned int} | long long unsigned int* main.cpp:37:19: warning: format ‘%llu’ expects a matching ‘long long unsigned int’ argument [-Wformat=] 37 | printf("%llu/%llu",end/start); | ~~~^ | | | long long unsigned int main.cpp:34:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 34 | scanf("%d",&n); | ~~~~~^~~~~~~~~ main.cpp:35:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 35 | scanf("%llu",&start); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:36:19: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 36 | rep(i,n-1) scanf("%llu",end); | ~~~~~^~~~~~~~~~~~ main.cpp:36:19: warning: ‘end’ may be used uninitialized [-Wmaybe-uninitialized] 36 | rep(i,n-1) scanf("%llu",end); | ~~~~~^~~~~~~~~~~~
ソースコード
#include <cstring> #include <algorithm> #include <cstdio> #include <ctype.h> #include <limits.h> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; /* ここからが本編 */ /* */ /* 入力開始! */ /* 入力終了! */ /* ll_pow(x,n)はx^nを返すよ! */ ll ll_pow(ll x,ll n) { ll res = 1; while(n > 0) { if(n&1) res = res * x; x = x * x; n >>= 1; } return res; } int main(void) { int i,j; int n; ull start,end; scanf("%d",&n); scanf("%llu",&start); rep(i,n-1) scanf("%llu",end); printf("%llu/%llu",end/start); return 0; }