結果
| 問題 |
No.1423 Triangle of Multiples
|
| コンテスト | |
| ユーザー |
tsuishi
|
| 提出日時 | 2021-03-19 11:16:02 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,195 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 30,976 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-17 21:45:08 |
| 合計ジャッジ時間 | 1,081 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 4 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Yukicoder №1423 Triangle of Multiples ★☆
// https://yukicoder.me/problems/no/1423
// ***********************
#define gc(c) do{c = getchar();}while(0)
#define GETLINE(str) do{char *p;fgets(str,sizeof(str),stdin);p=strchr(str,'\n');if(p)*p='\0';}while(0)
static char *GETWORD(char* str) {char c;char *cp;cp=&str[0];gc(c);while(c!=EOF){if((c==' ')||(c=='\n'))break;*cp++=c;gc(c);}*cp='\0';return &str[0];}
static int GETLINEINT(void) {char s[34];GETLINE(s);return atoi(s);}
static int GETWORDINT(void) {char s[34];GETWORD(s);return atoi(s);}
static int maxi(int a,int b){if(a>b){return a;}return b;}
#define Yes(a) printf("%s",((a)?"Yes":"No"))
// *********************
static int min(int a,int b){if(a<b){return a;}return b;}
static int mid(int a,int b,int c){if(a<b && c<a){return a;}else if(a<b && b<c){return b;}else return c;}
#define REP(a,b) for(int a=0;a<(b);++a)
// *********************
int main( void ) {
int a,b,c;
int q;
q = GETLINEINT();
REP(i,q) {
a = GETWORDINT();
b = GETWORDINT();
c = GETWORDINT();
printf("%d %d %d\n",a*maxi(b,c)%100000000,b*mid(a,b,c)%100000000,c*mid(a,b,c)%100000000);
}
}
tsuishi