結果
問題 |
No.280 歯車の問題(1)
|
ユーザー |
|
提出日時 | 2015-11-12 20:57:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 701 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 34,560 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 14:31:41 |
合計ジャッジ時間 | 2,542 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 31 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: 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); | ~~~~~^~~~~~~~~~~~~
ソースコード
#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; }