結果

問題 No.280 歯車の問題(1)
ユーザー namaenadonaize
提出日時 2015-09-19 04:07:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 213 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 21,888 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 07:51:53
合計ジャッジ時間 2,259 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
main.cpp:12:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |         scanf("%lld", &z[i]);
      |         ~~~~~^~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>

int n;
long long int z[50];

int i;

int main(void)
{
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
	scanf("%lld", &z[i]);
    }

    printf("%lld/%lld\n", z[n - 1], z[0]);
    return 0;
}
0