結果

問題 No.296 n度寝
ユーザー uliba3
提出日時 2020-07-20 18:40:52
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 279 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 191,408 KB
最終ジャッジ日時 2025-01-12 01:16:40
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |   int N,H,M,T;scanf("%d %d %d %d",&N,&H,&M,&T);
      |               ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;

int main()
{
  int N,H,M,T;scanf("%d %d %d %d",&N,&H,&M,&T);
  int minsum=(N-1)*T;
  int hplus=minsum/60;int minplus=minsum-hplus*60;
  H+=hplus,M+=minplus;
  H+=M/60;M%=60;
  H%=24;
  printf("%d\n%d\n",H,M);
}
0