結果
問題 | No.280 歯車の問題(1) |
ユーザー |
|
提出日時 | 2015-11-12 20:58:10 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 622 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 14:31:44 |
合計ジャッジ時間 | 2,398 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:30:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 30 | scanf("%d",&n); | ~~~~~^~~~~~~~~ main.cpp:31:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 31 | scanf("%llu",&start); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:32:19: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 32 | rep(i,n-1) scanf("%llu",&end); | ~~~~~^~~~~~~~~~~~~
ソースコード
#include <cstdio> #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; }