結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
JokoMasaya
|
| 提出日時 | 2019-01-05 19:13:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 1,000 ms |
| コード長 | 218 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 27,264 KB |
| 最終ジャッジ日時 | 2025-01-06 20:10:15 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d%d%d%d",&n,&h,&m,&t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int n,h,m,t,o,h2,h3,m3;
scanf("%d%d%d%d",&n,&h,&m,&t);
o = m + t*n - t;
h2 = o/60;
h3 = h + h2;
h3 %= 24;
m3 = o - h2*60;
printf("%d\n%d",h3,m3);
}
JokoMasaya