結果
| 問題 |
No.280 歯車の問題(1)
|
| コンテスト | |
| ユーザー |
カルロス
|
| 提出日時 | 2015-10-05 15:07:42 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 318 bytes |
| コンパイル時間 | 393 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 19:37:37 |
| 合計ジャッジ時間 | 2,400 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lld", &z1);
| ^~~~~~~~~~~~~~~~~~
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld", &zx);
| ^~~~~~~~~~~~~~~~~~
main.c:11:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%lldd", &zn);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
long long int z1, zn, zx;
int i, n;
scanf("%d", &n);
scanf("%lld", &z1);
for(i=1;i<(n-1);i++){
scanf("%lld", &zx);
}
scanf("%lldd", &zn);
if(zn%z1==0){
zn /= z1;
z1 = 1;
}
printf("%lld/%lld\n", zn, z1);
return 0;
}
カルロス