結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-09 22:32:01 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 387µs | |
| コード長 | 311 bytes |
| 記録 | |
| コンパイル時間 | 828 ms |
| コンパイル使用メモリ | 181,780 KB |
| 実行使用メモリ | 9,876 KB |
| 最終ジャッジ日時 | 2026-09-28 22:11:03 |
| 合計ジャッジ時間 | 3,629 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:18:15: warning: 'top' may be used uninitialized [-Wmaybe-uninitialized]
18 | printf("%lld/%lld\n", top, bottom);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:19: note: 'top' was declared here
11 | long long top, bottom;
| ^~~
main.cpp:18:15: warning: 'bottom' may be used uninitialized [-Wmaybe-uninitialized]
18 | printf("%lld/%lld\n", top, bottom);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:11:24: note: 'bottom' was declared here
11 | long long top, bottom;
| ^~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
long long top, bottom;
for(int i = 0; i < n; i++) {
long long z;
cin >> z;
if(i == 0) bottom = z;
if(i == n - 1) top = z;
}
printf("%lld/%lld\n", top, bottom);
return 0;
}